From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0395.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0395.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0395.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0395.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0395.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0395.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0395.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0395.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0395.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0395.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0395.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0395.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0395.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0395.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0395.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0395.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0395.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0395.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0395.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0392.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0395.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0395.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0395.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0395.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0395.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0395.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0395.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0395.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0395.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0396.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0396.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0396.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0396.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0396.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0396.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0396.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0396.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0396.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0396.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0396.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0396.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0396.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0396.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0396.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0396.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0396.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0396.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0396.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0393.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0396.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0396.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0396.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0396.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0396.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0396.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0396.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0396.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0396.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0397.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0397.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0397.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0397.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0397.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0397.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0397.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0397.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0397.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0397.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0397.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0397.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0397.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0397.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0397.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0397.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0397.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0397.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0397.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0394.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0397.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0397.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0397.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0397.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0397.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0397.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0397.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0397.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0397.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0398.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0398.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0398.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0398.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0398.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0398.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0398.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0398.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0398.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0398.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0398.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0398.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0398.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0398.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0398.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0398.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0398.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0398.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0398.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0395.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0398.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0398.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0398.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0398.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0398.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0398.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0398.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0398.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0398.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0399.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0399.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0399.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0399.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0399.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0399.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0399.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0399.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0399.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0399.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0399.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0399.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0399.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0399.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0399.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0399.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0399.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0399.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0399.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0396.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0399.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0399.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0399.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0399.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0399.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0399.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0399.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0399.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0399.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0400.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0400.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0400.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0400.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0400.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0400.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0400.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0400.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0400.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0400.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0400.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0400.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0400.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0400.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0400.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0400.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0400.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0400.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0400.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0397.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0400.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0400.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0400.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0400.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0400.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0400.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0400.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0400.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0400.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0401.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0401.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0401.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0401.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0401.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0401.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0401.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0401.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0401.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0401.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0401.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0401.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0401.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0401.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0401.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0401.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0401.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0401.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0401.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0398.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0401.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0401.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0401.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0401.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0401.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0401.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0401.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0401.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0401.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0402.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0402.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0402.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0402.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0402.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0402.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0402.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0402.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0402.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0402.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0402.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0402.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0402.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0402.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0402.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0402.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0402.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0402.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0402.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0399.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0402.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0402.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0402.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0402.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0402.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0402.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0402.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0402.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0402.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0403.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0403.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0403.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0403.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0403.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0403.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0403.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0403.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0403.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0403.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0403.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0403.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0403.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0403.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0403.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0403.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0403.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0403.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0403.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0400.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0403.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0403.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0403.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0403.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0403.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0403.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0403.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0403.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0403.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0404.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0404.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0404.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0404.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0404.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0404.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0404.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0404.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0404.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0404.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0404.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0404.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0404.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0404.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0404.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0404.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0404.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0404.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0404.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0401.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0404.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0404.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0404.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0404.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0404.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0404.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0404.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0404.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0404.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0001.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0001.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0001.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0001.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0001.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0001.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0001.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0001.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0001.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0001.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0001.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0001.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0001.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0001.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0001.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0001.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0001.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0001.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0001.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0001.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0001.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0001.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0001.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0001.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0001.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0001.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0001.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0002.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0002.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0002.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0002.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0002.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0002.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0002.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0002.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0002.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0002.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0002.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0002.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0002.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0002.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0002.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0002.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0002.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0002.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0002.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0002.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0002.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0002.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0002.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0002.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0002.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0002.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0002.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0002.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0002.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0003.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0003.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0003.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0003.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0003.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0003.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0003.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0003.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0003.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0003.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0003.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0003.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0003.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0003.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0003.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0003.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0003.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0003.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0003.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0003.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >> 0x6d6b0000 - 0x6d6bc000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >> 0x6d370000 - 0x6d38d000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >> 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >> 0x6d290000 - 0x6d297000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >> 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >> 0x6d2b0000 - 0x6d2ed000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >> 0x773a0000 - 0x774a2000 >> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >> 0x0b180000 - 0x0b193000 >> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >> >> VM Arguments: >> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug >> -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >> java_command: com.klimat.apps.Klimat_UI >> Launcher Type: SUN_STANDARD >> >> Environment Variables: >> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >> Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >> Computer Solutions\UltraCompare >> USERNAME=Puccet >> OS=Windows_NT >> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >> >> >> >> --------------- S Y S T E M --------------- >> >> OS: Windows XP Build 2600 Service Pack 2 >> >> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >> >> Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k >> free) >> >> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built >> on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From roberto at tavares.eng.br Wed Feb 22 10:55:24 2006 From: roberto at tavares.eng.br (Roberto Tavares) Date: Wed, 22 Feb 2006 14:55:24 -0300 Subject: [Rxtx] Java Web Start? Message-ID: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Hello, Is there any workaround of how to make a win/linux rxtx webstart-based application? The problem: with JWS, I cannot make the "manual" install... Thanks, Roberto From g.telkamp at domologic.de Wed Feb 22 11:02:24 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Wed, 22 Feb 2006 19:02:24 +0100 Subject: [Rxtx] UnsatisfiedLinkError Message-ID: <43FCA730.5000907@domologic.de> Hi, using the current RXTX from CVS (Verision 2.1-7) , I'm getting an "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(Unknown Source) at jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) at jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) Error 0x5 at termios.c(860): Access denied Meybe there is one serial port locked on my PC currently, but anyway - this message is unexpected. I've found out that the definition of the native part is missing in Serial.def: Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 So if you add this definition, everything works. Please add this to the current CVS version of Serial.def. Best regards Gerrit. From f.frumento at ngi.it Wed Feb 22 11:36:11 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 19:36:11 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: <43FCAF1B.9020806@ngi.it> Glad to hear things are running well, hope to hear some big news soon ;) bye! Fabio Trent Jarvi wrote: > > Thanks Fabio > > I figured it was possible but didnt look. I'll put that into the > Makefiles in a couple days. When I return home. > > Trip to Boston went great BTW. > > On Wed, 22 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> After digging a while in the mingw documentation i've found that with >> the following lines i can build working rxtxSerial.dll and >> rxtxParallel.dll without the hassle of the sed/grep stuff i don't know >> if you already know but the lines are (as they appear in the makefile): >> >> $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll >> $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc >> >> $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile >> gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ >> -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) >> -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll >> $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c >> $(SPATH)/init.cc >> >> this is the offical way to build a native java library as explained here: >> >> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll >> >> Fabio Frumento wrote: >>> Hi Trent, >>> >>> I have a new problem compiling Rxtx with windows, the build process >>> end fine but if i try to use the .dll files the Java virtual machine >>> crash in the nativeGetVersion of the SerialImp.c the strange thing >>> is that I've already successful build the .dll some week ago and i've >>> not touched the build environment neither the Java installation... >>> >>> I'm using mingw CURRENT release with the MSYS environment, could >>> kindly tell me what are you using to buil the windows version of RXTX ? >>> >>> here is the message: >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> # An error report file with more information is saved as >>> hs_err_pid4228.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> # >>> >>> Regards >>> Fabio >>> >>> >>> ------------------------------------------------------------------------ >>> >>> # >>> # An unexpected error has been detected by HotSpot Virtual Machine: >>> # >>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, >>> pid=4228, tid=3948 >>> # >>> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >>> # Problematic frame: >>> # V [jvm.dll+0x115216] >>> # >>> >>> --------------- T H R E A D --------------- >>> >>> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >>> >>> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >>> >>> Registers: >>> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >>> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >>> EIP=0x6d7f5216, EFLAGS=0x00010246 >>> >>> Top of Stack: (sp=0x0006f220) >>> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >>> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >>> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >>> 0x0006f250: 0630d214 00356890 00356890 00000006 >>> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >>> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >>> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >>> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 Instructions: >>> (pc=0x6d7f5216) >>> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >>> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >>> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, >>> C=native code) >>> V [jvm.dll+0x115216] >>> V [jvm.dll+0xd484b] >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xa17f5] >>> V [jvm.dll+0x9abb2] >>> C [java.dll+0x13d8] >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x76f5d] >>> V [jvm.dll+0x75e58] >>> V [jvm.dll+0xc4baa] >>> V [jvm.dll+0xc5847] >>> V [jvm.dll+0xc572d] >>> V [jvm.dll+0x7fc8d] >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> V [jvm.dll+0x845a9] >>> V [jvm.dll+0xd9317] >>> V [jvm.dll+0x8447a] >>> V [jvm.dll+0x8b44a] >>> C [javaw.exe+0x14c5] >>> C [javaw.exe+0x3151] >>> C [kernel32.dll+0x16d4f] >>> >>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >>> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >>> j gnu.io.RXTXCommDriver.()V+9 >>> v ~StubRoutines::call_stub >>> j >>> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >>> >>> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >>> j gnu.io.CommPortIdentifier.()V+12 >>> v ~StubRoutines::call_stub >>> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >>> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >>> v ~StubRoutines::call_stub >>> >>> --------------- P R O C E S S --------------- >>> >>> Java Threads: ( => current thread ) >>> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >>> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, >>> id=5924] >>> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >>> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, >>> id=5492] >>> 0x00a3c520 JavaThread "Low Memory Detector" daemon >>> [_thread_blocked, id=4460] >>> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, >>> id=5260] >>> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >>> id=4564] >>> 0x00a380f8 JavaThread "JDWP Command Reader" daemon >>> [_thread_in_native, id=5868] >>> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon >>> [_thread_blocked, id=4720] >>> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >>> [_thread_blocked, id=3696] >>> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >>> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >>> id=3260] >>> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >>> >>> Other Threads: >>> 0x00a23448 VMThread [id=5396] >>> 0x00a3d7a8 WatcherThread [id=5540] >>> >>> VM state:not at safepoint (normal execution) >>> >>> VM Mutex/Monitor currently owned by a thread: None >>> >>> Heap >>> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >>> 0x02f50000) >>> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >>> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >>> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >>> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >>> 0x06a70000) >>> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >>> 0x030b0000) >>> compacting perm gen total 8192K, used 6014K [0x06a70000, >>> 0x07270000, 0x0aa70000) >>> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >>> 0x07270000) >>> No shared spaces configured. >>> >>> Dynamic libraries: >>> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >>> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >>> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >>> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >>> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >>> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >>> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >>> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >>> 0x6d6e0000 - 0x6d874000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >>> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >>> 0x6d2f0000 - 0x6d2f8000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >>> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >>> 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll >>> 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll >>> 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll >>> 0x6d6d0000 - 0x6d6df000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll >>> 0x6d290000 - 0x6d297000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll >>> 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll >>> 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll >>> 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll >>> 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll >>> 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll >>> 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll >>> 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll >>> 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll >>> 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll >>> 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll >>> 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll >>> 0x6d070000 - 0x6d1d7000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll >>> 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV >>> 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll >>> 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll >>> 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll >>> 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll >>> 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll >>> 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL >>> 0x6d2b0000 - 0x6d2ed000 >>> C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll >>> 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll >>> 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll >>> 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll >>> 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll >>> 0x773a0000 - 0x774a2000 >>> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll >>> >>> 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll >>> 0x0b180000 - 0x0b193000 >>> C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll >>> 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll >>> >>> VM Arguments: >>> jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI >>> -Xdebug -Xnoagent >>> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 >>> java_command: com.klimat.apps.Klimat_UI >>> Launcher Type: SUN_STANDARD >>> >>> Environment Variables: >>> JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 >>> CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip >>> PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File >>> comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer >>> Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL >>> Server >>> 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM >>> Computer Solutions\UltraCompare >>> USERNAME=Puccet >>> OS=Windows_NT >>> PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD >>> >>> >>> >>> --------------- S Y S T E M --------------- >>> >>> OS: Windows XP Build 2600 Service Pack 2 >>> >>> CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse >>> >>> Memory: 4k page, physical 2097151k(2097151k free), swap >>> 4194303k(4194303k free) >>> >>> vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, >>> built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Feb 22 12:48:32 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 14:48:32 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: Hi Roberto, I think the problem with linux is access to the serial ports. Once the root user sets up/configures these things, the installation seems to work OK. I don't know what to do about that. - Doug >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 12:52:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 12:52:40 -0700 (MST) Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: <43FCA730.5000907@domologic.de> References: <43FCA730.5000907@domologic.de> Message-ID: On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > Hi, > > using the current RXTX from CVS (Verision 2.1-7) , I'm getting an > "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): > > java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(Unknown Source) > at > jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) > at > jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) > at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) > Error 0x5 at termios.c(860): Access denied > > Meybe there is one serial port locked on my PC currently, but anyway - this > message is unexpected. > > I've found out that the definition of the native part is missing in > Serial.def: > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > > So if you add this definition, everything works. Please add this to the > current CVS version of Serial.def. > Thanks Gerrit Just so I understand, you tried to compile your own dll when you had the problem? In otherwords, you didnt see this with the binary we offer? I'll put the change in (and solve this once and for all with the earlier Makefile fix mentioned today). -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Wed Feb 22 12:56:59 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Feb 2006 14:56:59 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> Message-ID: <16635194.1140638219433.JavaMail.dmarkman@mac.com> did you signed your jars? On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: >Hello, > >Is there any workaround of how to make a win/linux rxtx webstart-based >application? > >The problem: with JWS, I cannot make the "manual" install... > >Thanks, > >Roberto > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman From roberto.tavares at gmail.com Wed Feb 22 14:12:00 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Wed, 22 Feb 2006 18:12:00 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: <16635194.1140638219433.JavaMail.dmarkman@mac.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> Message-ID: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Dmitry, Dr. Lyon, everyone, I believe that the my question is before the jar: when I install the rxtx, I needed to install some files on java/lib, and some other little things for install the javax.comm. The problem is: I know how to make a C++ software that the user clicks, installs, and speakes on RS-232. My question is: I want to make a Java Web Start software that installs all the "bells and whistles" that I need to connect to the serial port. Is it possible, assuming that my jars are all signed and I have all permissions granted? Does anyone already did that? Thanks! On 2/22/06, Dmitry Markman wrote: > > did you signed your jars? > > > On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares wrote: > > >Hello, > > > >Is there any workaround of how to make a win/linux rxtx webstart-based > >application? > > > >The problem: with JWS, I cannot make the "manual" install... > > > >Thanks, > > > >Roberto > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > Dmitry Markman > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Feb 22 14:57:22 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 22 Feb 2006 16:57:22 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: Hi All, I think that: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Will work on linux window and mac. Provided that the user has write access to the serial ports. - DL >Dmitry, Dr. Lyon, everyone, > >I believe that the my question is before the jar: when I install the >rxtx, I needed to install some files on java/lib, and some other >little things for install the javax.comm. > >The problem is: I know how to make a C++ software that the user >clicks, installs, and speakes on RS-232. My question is: I want to >make a Java Web Start software that installs all the "bells and >whistles" that I need to connect to the serial port. Is it possible, >assuming that my jars are all signed and I have all permissions >granted? > >Does anyone already did that? > >Thanks! > >On 2/22/06, Dmitry Markman wrote: >> >> did you signed your jars? >> >> >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >> wrote: >> >> >Hello, >> > >> >Is there any workaround of how to make a win/linux rxtx webstart-based >> >application? >> > >> >The problem: with JWS, I cannot make the "manual" install... >> > >> >Thanks, >> > >> >Roberto >> > >> >_______________________________________________ >> >Rxtx mailing list >> >Rxtx at qbang.org >> >http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > >> >> >> Dmitry Markman >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From g.telkamp at domologic.de Wed Feb 22 23:42:46 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 23 Feb 2006 07:42:46 +0100 Subject: [Rxtx] UnsatisfiedLinkError In-Reply-To: References: <43FCA730.5000907@domologic.de> Message-ID: <43FD5966.2050107@domologic.de> On Wed, 22 Feb 2006, Gerrit Telkamp wrote: > >> Hi, >> >> using the current RXTX from CVS (Verision 2.1-7) , I'm getting an >> "Unsatisfied Link Error" each time the DLL is loaded (using WinXP): >> >> java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at >> gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(Unknown Source) at >> jcontrol.util.comm.driver.rs232.RXTXCommPortIdentifier.open(RXTXCommPortIdentifier.java:67) >> at >> jcontrol.util.comm.driver.rs232.RS232Port.isAvailable(RS232Port.java:109) >> at jcontrol.editors.terminal.Terminal$16.run(Terminal.java:312) >> Error 0x5 at termios.c(860): Access denied >> Meybe there is one serial port locked on my PC currently, but anyway >> - this message is unexpected. >> >> I've found out that the definition of the native part is missing in >> Serial.def: >> >> Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner=Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 >> >> >> >> So if you add this definition, everything works. Please add this to >> the current CVS version of Serial.def. >> > > Thanks Gerrit > > Just so I understand, you tried to compile your own dll when you had > the problem? In otherwords, you didnt see this with the binary we > offer? > > I'll put the change in (and solve this once and for all with the > earlier Makefile fix mentioned today). Hi Trent, yes, I've compiled my own DLL using the mingw-gcc distribution. And yes, I didn't saw the binary release you offer. .. Gerrit. From gildedfalcon at googlemail.com Thu Feb 23 03:27:01 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 11:27:01 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! > > Have you turned on hardware flow control? Doing a cat suggests some parts > of the driver are correct. If its open source, the odds are good the > entire driver is correct. But cat does not do very much. > Well, I don't know exactly, what you mean and where to do this. The java-application works fine on the windows-machine, thus the setting there should be correct. Also the mobile device I am using (Nokia N90) is the same and working with the windows machine. Thus the settings there should be correct to. What is left is the mobile device with arm-linux on it. But cat is working fine there. Any further details/suggestions ? > If someone wants to do something with rxtx 2.0 they can. I will not be > looking at it until after the known issues are resolved and sun offers a > release or prerelease to work with. It's a waste of time until then. > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > code with just some names changed to protect the inocent. I trust you in this. But what to do know? Do you want to look at my code and check it? Phil From roberto.tavares at gmail.com Thu Feb 23 04:38:29 2006 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 23 Feb 2006 08:38:29 -0300 Subject: [Rxtx] Java Web Start? In-Reply-To: References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> Message-ID: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Hello again, I saw the code of the jnlp, but I missed one part: when I installed the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so to /usr/lib. But on the jnlp, there is no such reference. Btw, I believe that will be no problem to grant user-level permission to the serial ports (makes sense... if the user wants to use the port, he must be able to do to). But grant write public access to /usr/lib could be a problem... I believe that on Windows/Mac will have similar issues(maybe not...). How can be it solved? Thanks, Roberto PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I can take a look on the structure of the dirs(I try to download it putting on the address bar of my browser, but my browser echoes it like a plain text...)? Thanks! On 2/22/06, Dr. Douglas Lyon wrote: > Hi All, > I think that: > http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp > Will work on linux window and mac. Provided that > the user has write access to the serial ports. > - DL > > >Dmitry, Dr. Lyon, everyone, > > > >I believe that the my question is before the jar: when I install the > >rxtx, I needed to install some files on java/lib, and some other > >little things for install the javax.comm. > > > >The problem is: I know how to make a C++ software that the user > >clicks, installs, and speakes on RS-232. My question is: I want to > >make a Java Web Start software that installs all the "bells and > >whistles" that I need to connect to the serial port. Is it possible, > >assuming that my jars are all signed and I have all permissions > >granted? > > > >Does anyone already did that? > > > >Thanks! > > > >On 2/22/06, Dmitry Markman wrote: > >> > >> did you signed your jars? > >> > >> > >> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares > >> wrote: > >> > >> >Hello, > >> > > >> >Is there any workaround of how to make a win/linux rxtx webstart-based > >> >application? > >> > > >> >The problem: with JWS, I cannot make the "manual" install... > >> > > >> >Thanks, > >> > > >> >Roberto > >> > > >> >_______________________________________________ > >> >Rxtx mailing list > >> >Rxtx at qbang.org > >> >http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > >> > > >> > >> > >> Dmitry Markman > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > From gildedfalcon at googlemail.com Thu Feb 23 07:27:21 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 15:27:21 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Well, I think I give you the code. Look at it, if you want to. /** Method to initialize the serial port and set up the * input and output streams * */ public Receiver() { Enumeration portList; // will hold all the ports available on the system CommPortIdentifier portId = null; // will hold the current single port as we loop hrough all available in the system SerialPort serialPort = null; // this will hold the serial port choosen to be used boolean portFound = false; // wether the decided port was found or not (if not, maybe it's blocked by another application) // get all avaliable ports in the system portList = CommPortIdentifier.getPortIdentifiers(); // loop through all ports and find the desired port to use while (portList.hasMoreElements() && !portFound) { // get the port id portId = (CommPortIdentifier) portList.nextElement(); // check and make sure port type is serial (and not paralel or other) if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { // then check that the port is the requested one System.out.println(portId.getName()); if(portId.getName().equalsIgnoreCase(port)) { try { portFound = true; // Open the serial port. The name is unimportant, // The second (timeout) parameter is unimplemented serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); // Set the baud rate, etc, use 115 kbaud to make it more stressful serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); //System.out.println("Serial Port free"); // Register for notification of data changes try { serialPort.addEventListener(this); } catch (Exception tml) { System.out.println("addEventListener error " + tml.toString() + ": " + tml.getMessage()); System.exit(1); } SerialPort.notifyOnDataAvailable(true); // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); } catch (UnsupportedCommOperationException ucoe) { System.out.println("Error: UnsupportedCommOperationException"); System.exit(1); } catch (PortInUseException piue) { System.out.println("Error: PortInUseException"); System.exit(1); } catch (java.io.IOException ioe) { System.out.println("Error: IOException"); System.exit(1); } } //end if } // end if } // end while if (portFound) System.out.println("Server up, waiting for data..."); else { System.out.println("Error: Did not found the given port to listen. Maybe it's blocked by another application or it simply does not exist."); System.exit(0); } } // end method /** Javax.comm will call this method whenever a Data Available event occurs * On serial ports without hardware flow control this is the only event supported. * This means the onboard UARTs of JStamp/JStik/SaJe * * @params ev this is the serial event */ public void serialEvent(SerialPortEvent ev) { try { // only event supported on the aj100 if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { /* If contentLength isn't set yet, then the header has not been send properly. * Thus, it is first nessesary to parse the header to know, how many bytes are needed to get. */ // [... the parser was here - it's cut out because it does not really matter. It initializes contentLenght...] rcvBytes = new byte[contentLength]; /* Now just read the files. The Buffer should be big enough for * our needs */ byte[] readBuffer = new byte[2048]; while (inStream.available() > 0) { int numBytes = inStream.read(readBuffer); for (int i = 0; i < numBytes; i++) { rcvBytes[i+rcvByteCount] = readBuffer[i]; } rcvByteCount += numBytes; System.out.println(rcvByteCount); } /* Storing the arrived data and resetting the Receiver when the file has arrived. */ if (rcvByteCount >= contentLength) { System.out.println("done"); contentLength = 0; rcvByteCount = 0; } } catch (IOException e) { System.out.println("IOException caught in serialEvent"); } } } catch (Exception e) { System.out.println("Exception caught outside serialEvent: " + e.toString()); e.printStackTrace(); } } // end serialEvent 2006/2/23, Philipp Kemmeter : > Heya! > > > > > Have you turned on hardware flow control? Doing a cat suggests some parts > > of the driver are correct. If its open source, the odds are good the > > entire driver is correct. But cat does not do very much. > > > > Well, I don't know exactly, what you mean and where to do this. The > java-application works fine on the windows-machine, thus the setting > there should be correct. Also the mobile device I am using (Nokia N90) > is the same and working with the windows machine. Thus the settings > there should be correct to. What is left is the mobile device with > arm-linux on it. But cat is working fine there. > Any further details/suggestions ? > > > If someone wants to do something with rxtx 2.0 they can. I will not be > > looking at it until after the known issues are resolved and sun offers a > > release or prerelease to work with. It's a waste of time until then. > > > > But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > code with just some names changed to protect the inocent. > > I trust you in this. But what to do know? > > Do you want to look at my code and check it? > > Phil > From tjarvi at qbang.org Thu Feb 23 09:06:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 09:06:45 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hi Philipp You will want to set the following explicitly when you are unsure and seeing differences between windows and linux. timeout treshold flow control mode (none xon/xoff hardware/... These are all in the javadoc for sun's CommAPI. You can probably see what windows has set too. The defaults are whatever the OS is doing. Usually thats right. But I've not characterized them. I don't think sun documented defaults either. So one of the above could be causing the issue. Especially flow control. I can say more Sunday if you still have problems. I'm getting ready to head back home. On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > Well, I think I give you the code. Look at it, if you want to. > > /** Method to initialize the serial port and set up the > * input and output streams > * > */ > public Receiver() { > Enumeration portList; // will hold all the ports available on the system > CommPortIdentifier portId = null; // will hold the current single > port as we loop hrough all available in the system > SerialPort serialPort = null; // this will hold the serial port > choosen to be used > boolean portFound = false; // wether the decided port was found or > not (if not, maybe it's blocked by another application) > > // get all avaliable ports in the system > portList = CommPortIdentifier.getPortIdentifiers(); > // loop through all ports and find the desired port to use > while (portList.hasMoreElements() && !portFound) { > > // get the port id > portId = (CommPortIdentifier) portList.nextElement(); > // check and make sure port type is serial (and not paralel or other) > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > // then check that the port is the requested one > System.out.println(portId.getName()); > if(portId.getName().equalsIgnoreCase(port)) { > try { > portFound = true; > // Open the serial port. The name is unimportant, > // The second (timeout) parameter is unimplemented > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > //System.out.println("Serial Port free"); > // Register for notification of data changes > try { > serialPort.addEventListener(this); > } > catch (Exception tml) { > System.out.println("addEventListener error " + > tml.toString() + ": " + tml.getMessage()); > System.exit(1); > } > SerialPort.notifyOnDataAvailable(true); > // Get output and input streams > outStream = serialPort.getOutputStream(); > inStream = serialPort.getInputStream(); > > } catch (UnsupportedCommOperationException ucoe) { > System.out.println("Error: UnsupportedCommOperationException"); > System.exit(1); > } catch (PortInUseException piue) { > System.out.println("Error: PortInUseException"); > System.exit(1); > } catch (java.io.IOException ioe) { > System.out.println("Error: IOException"); > System.exit(1); > } > } //end if > } // end if > } // end while > if (portFound) > System.out.println("Server up, waiting for data..."); > else { > System.out.println("Error: Did not found the given port to listen. > Maybe it's blocked by another application or it simply does not > exist."); > System.exit(0); > } > } // end method > > /** Javax.comm will call this method whenever a Data Available event occurs > * On serial ports without hardware flow control this is the only > event supported. > * This means the onboard UARTs of JStamp/JStik/SaJe > * > * @params ev this is the serial event > */ > public void serialEvent(SerialPortEvent ev) { > try { > // only event supported on the aj100 > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > try { > /* If contentLength isn't set yet, then the header has not > been send properly. > * Thus, it is first nessesary to parse the header to know, > how many bytes are needed to get. > */ > > // [... the parser was here - it's cut out because it does > not really matter. It initializes contentLenght...] > > rcvBytes = new byte[contentLength]; > > /* Now just read the files. The Buffer should be big enough for > * our needs > */ > byte[] readBuffer = new byte[2048]; > while (inStream.available() > 0) { > int numBytes = inStream.read(readBuffer); > for (int i = 0; i < numBytes; i++) { > rcvBytes[i+rcvByteCount] = readBuffer[i]; > } > > rcvByteCount += numBytes; > > System.out.println(rcvByteCount); > } > > /* Storing the arrived data and resetting the Receiver when > the file has arrived. */ > if (rcvByteCount >= contentLength) { > System.out.println("done"); > contentLength = 0; > rcvByteCount = 0; > } > > } catch (IOException e) { > System.out.println("IOException caught in serialEvent"); > } > } > } catch (Exception e) { > System.out.println("Exception caught outside serialEvent: " + e.toString()); > e.printStackTrace(); > } > > } // end serialEvent > > > > > 2006/2/23, Philipp Kemmeter : >> Heya! >> >>> >>> Have you turned on hardware flow control? Doing a cat suggests some parts >>> of the driver are correct. If its open source, the odds are good the >>> entire driver is correct. But cat does not do very much. >>> >> >> Well, I don't know exactly, what you mean and where to do this. The >> java-application works fine on the windows-machine, thus the setting >> there should be correct. Also the mobile device I am using (Nokia N90) >> is the same and working with the windows machine. Thus the settings >> there should be correct to. What is left is the mobile device with >> arm-linux on it. But cat is working fine there. >> Any further details/suggestions ? >> >>> If someone wants to do something with rxtx 2.0 they can. I will not be >>> looking at it until after the known issues are resolved and sun offers a >>> release or prerelease to work with. It's a waste of time until then. >>> >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native >>> code with just some names changed to protect the inocent. >> >> I trust you in this. But what to do know? >> >> Do you want to look at my code and check it? >> >> Phil >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gildedfalcon at googlemail.com Thu Feb 23 10:19:52 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 23 Feb 2006 18:19:52 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Okay, thanks alot so far. I will freeze the project till tuesday, because we have vacations here. I'm going to try the things you've said then. Phil 2006/2/23, Trent Jarvi : > > Hi Philipp > > You will want to set the following explicitly when you are unsure and > seeing differences between windows and linux. > > timeout > treshold > flow control mode (none xon/xoff hardware/... > > These are all in the javadoc for sun's CommAPI. You can probably see what > windows has set too. > > The defaults are whatever the OS is doing. Usually thats right. But I've > not characterized them. I don't think sun documented defaults either. > > So one of the above could be causing the issue. Especially flow control. > > I can say more Sunday if you still have problems. I'm getting ready to > head back home. > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > Well, I think I give you the code. Look at it, if you want to. > > > > /** Method to initialize the serial port and set up the > > * input and output streams > > * > > */ > > public Receiver() { > > Enumeration portList; // will hold all the ports available on the system > > CommPortIdentifier portId = null; // will hold the current single > > port as we loop hrough all available in the system > > SerialPort serialPort = null; // this will hold the serial port > > choosen to be used > > boolean portFound = false; // wether the decided port was found or > > not (if not, maybe it's blocked by another application) > > > > // get all avaliable ports in the system > > portList = CommPortIdentifier.getPortIdentifiers(); > > // loop through all ports and find the desired port to use > > while (portList.hasMoreElements() && !portFound) { > > > > // get the port id > > portId = (CommPortIdentifier) portList.nextElement(); > > // check and make sure port type is serial (and not paralel or other) > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > // then check that the port is the requested one > > System.out.println(portId.getName()); > > if(portId.getName().equalsIgnoreCase(port)) { > > try { > > portFound = true; > > // Open the serial port. The name is unimportant, > > // The second (timeout) parameter is unimplemented > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > //System.out.println("Serial Port free"); > > // Register for notification of data changes > > try { > > serialPort.addEventListener(this); > > } > > catch (Exception tml) { > > System.out.println("addEventListener error " + > > tml.toString() + ": " + tml.getMessage()); > > System.exit(1); > > } > > SerialPort.notifyOnDataAvailable(true); > > // Get output and input streams > > outStream = serialPort.getOutputStream(); > > inStream = serialPort.getInputStream(); > > > > } catch (UnsupportedCommOperationException ucoe) { > > System.out.println("Error: UnsupportedCommOperationException"); > > System.exit(1); > > } catch (PortInUseException piue) { > > System.out.println("Error: PortInUseException"); > > System.exit(1); > > } catch (java.io.IOException ioe) { > > System.out.println("Error: IOException"); > > System.exit(1); > > } > > } //end if > > } // end if > > } // end while > > if (portFound) > > System.out.println("Server up, waiting for data..."); > > else { > > System.out.println("Error: Did not found the given port to listen. > > Maybe it's blocked by another application or it simply does not > > exist."); > > System.exit(0); > > } > > } // end method > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > * On serial ports without hardware flow control this is the only > > event supported. > > * This means the onboard UARTs of JStamp/JStik/SaJe > > * > > * @params ev this is the serial event > > */ > > public void serialEvent(SerialPortEvent ev) { > > try { > > // only event supported on the aj100 > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > try { > > /* If contentLength isn't set yet, then the header has not > > been send properly. > > * Thus, it is first nessesary to parse the header to know, > > how many bytes are needed to get. > > */ > > > > // [... the parser was here - it's cut out because it does > > not really matter. It initializes contentLenght...] > > > > rcvBytes = new byte[contentLength]; > > > > /* Now just read the files. The Buffer should be big enough for > > * our needs > > */ > > byte[] readBuffer = new byte[2048]; > > while (inStream.available() > 0) { > > int numBytes = inStream.read(readBuffer); > > for (int i = 0; i < numBytes; i++) { > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > } > > > > rcvByteCount += numBytes; > > > > System.out.println(rcvByteCount); > > } > > > > /* Storing the arrived data and resetting the Receiver when > > the file has arrived. */ > > if (rcvByteCount >= contentLength) { > > System.out.println("done"); > > contentLength = 0; > > rcvByteCount = 0; > > } > > > > } catch (IOException e) { > > System.out.println("IOException caught in serialEvent"); > > } > > } > > } catch (Exception e) { > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > e.printStackTrace(); > > } > > > > } // end serialEvent > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > >> Heya! > >> > >>> > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > >>> of the driver are correct. If its open source, the odds are good the > >>> entire driver is correct. But cat does not do very much. > >>> > >> > >> Well, I don't know exactly, what you mean and where to do this. The > >> java-application works fine on the windows-machine, thus the setting > >> there should be correct. Also the mobile device I am using (Nokia N90) > >> is the same and working with the windows machine. Thus the settings > >> there should be correct to. What is left is the mobile device with > >> arm-linux on it. But cat is working fine there. > >> Any further details/suggestions ? > >> > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > >>> looking at it until after the known issues are resolved and sun offers a > >>> release or prerelease to work with. It's a waste of time until then. > >>> > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > >>> code with just some names changed to protect the inocent. > >> > >> I trust you in this. But what to do know? > >> > >> Do you want to look at my code and check it? > >> > >> Phil > >> > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 23 11:13:00 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 11:13:00 -0700 (MST) Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: On Thu, 23 Feb 2006, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > If you are using rxtx, there is no libSolarisSerialParallel.so Thats a Sun specific library. There is a rxtx librxtxSerial.so for Sun. So maybe you are mixing the two up. You can use Sun's but it has nothing to do with rxtx really. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Solaris/ Note that while they are all called librxtxSerial.so in rxtx for ~30 platforms, you have to use the one compiled for the platform you are targeting. On windows its just rxtxSerial.dll Mac OS X is librxtxSerial.jnilib. -- Trent Jarvi tjarvi at qbang.org From mtnvega at yahoo.com.br Thu Feb 23 13:31:02 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Thu, 23 Feb 2006 17:31:02 -0300 (ART) Subject: [Rxtx] En: Unwanted data in output! Message-ID: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Hello, I'm just starting with RXTX and I was testing the SimpleRead.java code attached to this e-mail. The problem is that not only the sent chars are being displayed but some "empty" chars. I have a calculator connected to the serial port, sending some numbers and text, and besides the data received, some chars are being presented together, as you can see as the spaces before de numbers in the output below. I know that only the numbers are being sent because I tested it with HyperTerminal and a Python terminal script. Could you help me with this? Why is this tabular or empty data being presented? The output are below this message. Thank you, Luiz A simple result from HyperTerminal 'MNOSF8543.' 'MNOSF8543.' Result from >java SimpleRead Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port: COM1 'MNOSF85 43.' 'MNOSF85 43.' 878. --------------------------------- Yahoo! Acesso Gr?tis Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/attachment-0003.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleRead.java Type: application/octet-stream Size: 2889 bytes Desc: pat846137612 Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/30ff1722/SimpleRead-0003.obj From dmarkman at mac.com Thu Feb 23 20:16:27 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Feb 2006 22:16:27 -0500 Subject: [Rxtx] Java Web Start? In-Reply-To: <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> References: <8d442b380602220955w1e9298f9k3667089727562f4a@mail.gmail.com> <16635194.1140638219433.JavaMail.dmarkman@mac.com> <8d442b380602221312p1dd6cec8v340db7e71400cdbd@mail.gmail.com> <8d442b380602230338j60823b3fm1c8bfa5f135d1a90@mail.gmail.com> Message-ID: <5ED22CB1-ADAC-4BBA-A606-33D1919F0AF2@mac.com> you can do the following: 1. require your customers to install rxtx, before running your trusted webstart application 2. create your own mini-installer: put everything you need into the jar file first time your application will run you'll start script that will set all permissions and files On Feb 23, 2006, at 6:38 AM, Roberto Tavares wrote: > Hello again, > > I saw the code of the jnlp, but I missed one part: when I installed > the Solaris for SerialComm, I had to copy libSolarisSerialParallel.so > to /usr/lib. But on the jnlp, there is no such reference. > > Btw, I believe that will be no problem to grant user-level permission > to the serial ports (makes sense... if the user wants to use the port, > he must be able to do to). But grant write public access to /usr/lib > could be a problem... > > I believe that on Windows/Mac will have similar issues(maybe not...). > How can be it solved? > > Thanks, > > Roberto > PS: Dr. Lyon, could you mail me the addbk.JAddressBook.Main.jar so I > can take a look on the structure of the dirs(I try to download it > putting on the address bar of my browser, but my browser echoes it > like a plain text...)? Thanks! > > On 2/22/06, Dr. Douglas Lyon wrote: >> Hi All, >> I think that: >> http://show.docjava.com:8086/book/cgij/code/jnlp/ >> addbk.JAddressBook.Main.jnlp >> Will work on linux window and mac. Provided that >> the user has write access to the serial ports. >> - DL >> >>> Dmitry, Dr. Lyon, everyone, >>> >>> I believe that the my question is before the jar: when I install the >>> rxtx, I needed to install some files on java/lib, and some other >>> little things for install the javax.comm. >>> >>> The problem is: I know how to make a C++ software that the user >>> clicks, installs, and speakes on RS-232. My question is: I want to >>> make a Java Web Start software that installs all the "bells and >>> whistles" that I need to connect to the serial port. Is it possible, >>> assuming that my jars are all signed and I have all permissions >>> granted? >>> >>> Does anyone already did that? >>> >>> Thanks! >>> >>> On 2/22/06, Dmitry Markman wrote: >>>> >>>> did you signed your jars? >>>> >>>> >>>> On Wednesday, February 22, 2006, at 01:03PM, Roberto Tavares >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is there any workaround of how to make a win/linux rxtx >>>>> webstart-based >>>>> application? >>>>> >>>>> The problem: with JWS, I cannot make the "manual" install... >>>>> >>>>> Thanks, >>>>> >>>>> Roberto >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> >>>> >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From agrodellic at gmail.com Thu Feb 23 23:02:36 2006 From: agrodellic at gmail.com (Leigh Stewart) Date: Fri, 24 Feb 2006 01:02:36 -0500 Subject: [Rxtx] dal semi/rxtx problems Message-ID: I am trying to get the OneWireViewer application at http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by dallas semi. to run, but am not having much luck. some important specs follow: rxtx version: rxtx 2.1.7_pre17 OS: gentoo linux kernel: 2.6.15-r1 jdk: have tried both sun jdk and blackdown jdk 1.4.2 The app starts up fine. It requires rxtx to be running properly in order to display some serial port data which it DOES so i know that all the rxtx libs etc are properly installed. But when i select the serial device for use and attempt to proceed I am greeted with the following schmiel: -----------------------BEGIN SCHMIEL----------------------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) # Problematic frame: # C [libc.so.6+0x628db] __libc_free+0x4a # # An error report file with more information is saved as hs_err_pid26515.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # -----------------------END SCHMIEL----------------------------- which comes with a logfile: see the attachment anyone have any ideas? im pretty sure allmy lock permissions are correct--anyway it doesnt matter i ran the app as root. thanks for your time all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/attachment-0003.html -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid26515.log Type: application/octet-stream Size: 20314 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060223/16171ee3/hs_err_pid26515-0003.obj From tjarvi at qbang.org Thu Feb 23 23:20:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 23 Feb 2006 23:20:02 -0700 (MST) Subject: [Rxtx] dal semi/rxtx problems In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Leigh Stewart wrote: > I am trying to get the OneWireViewer application at > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm by > dallas semi. to run, but am not having much luck. > > some important specs follow: > > rxtx version: rxtx 2.1.7_pre17 > OS: gentoo linux > kernel: 2.6.15-r1 > jdk: have tried both sun jdk and blackdown jdk 1.4.2 > > The app starts up fine. It requires rxtx to be running properly in order to > display some serial port data which it DOES so i know that all the rxtx libs > etc are properly installed. > > But when i select the serial device for use and attempt to proceed I am > greeted with the following schmiel: > > -----------------------BEGIN SCHMIEL----------------------------- > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb7ea28db, pid=26515, tid=2863430576 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode) > # Problematic frame: > # C [libc.so.6+0x628db] __libc_free+0x4a > # > # An error report file with more information is saved as hs_err_pid26515.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -----------------------END SCHMIEL----------------------------- > > which comes with a logfile: see the attachment > > anyone have any ideas? im pretty sure allmy lock permissions are > correct--anyway it doesnt matter i ran the app as root. > > thanks for your time all :) > I'll probably be shown wrong after saying this but here is what I suspect. I seriously doubt jdk 1.4.2 has been tested with the 2.6.15-r1 kernel. Gentoo and java often blow up like this with the latest and then the problem goes away. Oracle, IBM, probably Sun and others have teams doing formal testing for quality assurance on the kernel/jdk combos with Linux. Gentoo appears to follow 'HEAD' with kernel devel. This has advantages but also disadvantages. Their test suite for Java is probably you and people like you. The neat part is you get to be part of it. You can grab the same source Rhat/Suse/older debian uses and the problem will probably go away. Suse has shown a problem once in the last year on 64 bit amd systems but gentoo has shown problems more than once. Blackdown changes go upstream to Sun but 1.4.2 was released well before this kernel. Try a gentoo released before 1.4.2. I seriously doubt there is much rxtx can do here. The gentoo bugzilla would be a more appropriate place to find a fix. Especially if you can show older gentoo versions work. Its either glibc or the kernel at first glance. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Feb 24 05:19:49 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 24 Feb 2006 07:19:49 -0500 Subject: [Rxtx] arch Message-ID: Hi All, I think we need the moral equivalent of the unix ARCH function in Java. So > arch i686 Allows me to put the bin/i686 directory into my path, for CLI execution. We could use the arch function to map a consistently named file system containing the RXTX lib into a fully-qualified URL. Once this is done, I think we could beam over signed jars and place them into the java.library.path...using a reflection hack. This would automatically install the native libraries for all serial port users. What do you think of that? Thanks! - Doug P.S. The alternative is to create a long dispatch in the Java code or to create a long list of JNLP tags: Maintenance of the above is tedious, time-consuming and error-prone. P.P.S; Here is my first stab at such a function, it needs help,: /** * A what to get the properties os.name * @return the os.name */ public static String getOsName() { Properties prop = System.getProperties(); return prop.getProperty("os.name"); } /** * * @return true if it is a mac. */ public static boolean isMacOs() { final String prefix = "mac"; return isOsPrefix(prefix); } /** * * @return true if it is linux */ public static boolean isLinux() { return isOsPrefix("linux"); } /** * * @return true if it is net bsd */ public static boolean isNetBsd() { return isOsPrefix("NetBSD"); } /** * * @return true if it is freebsd */ public static boolean isFreeBsd() { return isOsPrefix("FreeBSD"); } /** * * @return true if it is solais or sunos */ public static boolean isSolaris() { return isOsPrefix("SunOS") || isOsPrefix("Solaris"); } public static boolean isWindowsNt() { return isWindows("nt"); } public static boolean isWindows2000() { return isWindows("2000"); } public static boolean isWindows98() { return isWindows("98"); } public static boolean isWindows95() { return isWindows("95"); } public static boolean isWindowsXp() { return isWindows("xp"); } public static boolean isWindows(String str) { if (isWindows()) { String os = getOsName().toLowerCase(); if (os.indexOf(str) > -1) return true; } return false; } public static boolean isWindows() { return isOsPrefix("win"); } - D From tjarvi at qbang.org Fri Feb 24 07:03:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 07:03:13 -0700 (MST) Subject: [Rxtx] arch In-Reply-To: References: Message-ID: On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I think we need the moral equivalent of > the unix ARCH function in Java. > So >> arch > i686 > Allows me to put the bin/i686 directory into > my path, for CLI execution. > > We could use the arch function to map a consistently named > file system containing the RXTX lib into a fully-qualified > URL. Once this is done, I think we could beam over signed jars > and place them into the java.library.path...using a reflection hack. > > This would automatically install the native libraries for all serial > port users. > > What do you think of that? > while doing configure to build rxtx, the configure script does this - with java. ... checking os.arch i386 ... OS_NAME=`run_conftest os.name` which is: run_conftest() { echo $ECHO_N checking $1 " " 1>&6 if test x$JPATH = x; then VAR=`java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` else VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which java\`../lib/RXTXcomm.jar conftest $1` fi echo $VAR 1>&6 echo $VAR return } and Finally: build_conftest() { cat > conftest.java << EOF /* this may be usefull for getting around java cobwebs during build */ public class conftest { public static void main(String[[]] args) { System.out.println(System.getProperty(args[[0]])); } } ... Did you want that in rxtx? Its rather simple. If so, where? -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 18:35:09 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 12:35:09 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins Message-ID: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Hi guys, I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) On linux it works fine. Previously, I was using rxtx-2.1-7pre17 and it was working fine. Can anyone help me? Raghu From tjarvi at qbang.org Fri Feb 24 19:36:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 24 Feb 2006 19:36:33 -0700 (MST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > Hi guys, > I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > On linux it works fine. > > Previously, I was using rxtx-2.1-7pre17 and it was working fine. > > Can anyone help me? > Hi Raghu That function is indeed missing in the library. I just confirmed it. Strange. I did test that some on windows (spin blackbox on loopback). I'll build it again. This matches earlier posts saying builds did not work outside of the rxtx.org bins for w32. Strange. I wonder what I did. Could you try this: ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll If this works, I'll replace it in the bins and toybox. As mentioned earlier the fuserImp.c is not being linked in or put in the exports. I'm wondering why it didn't fail here. I thought I tested those libraries. Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc 1000c7d4 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 Its there now. I put it into the Makefile locally. A better fix is comming for builds. -- Trent Jarvi tjarvi at qbang.org From raghu at bluesat.unsw.edu.au Fri Feb 24 20:41:26 2006 From: raghu at bluesat.unsw.edu.au (raghu@bluesat.unsw.edu.au) Date: Sat, 25 Feb 2006 14:41:26 +1100 (EST) Subject: [Rxtx] Problems with rxtx-2.1-7-bins In-Reply-To: References: <33437.60.227.28.45.1140831309.squirrel@www.bluesat.unsw.edu.au> Message-ID: <34432.60.227.28.45.1140838886.squirrel@www.bluesat.unsw.edu.au> Hi Trent, Thanks for responding so soon. That link with the new rxtxSerial.dll works and my code works as well, thanks again. Raghu > On Sat, 25 Feb 2006 raghu at bluesat.unsw.edu.au wrote: > >> Hi guys, >> I'm having some problems with rxtx-2.1-7-bins on WinXP. I got this >> error: >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: >> native_psmisc_report_owner >> at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> >> On linux it works fine. >> >> Previously, I was using rxtx-2.1-7pre17 and it was working fine. >> >> Can anyone help me? >> > > Hi Raghu > > That function is indeed missing in the library. I just confirmed it. > Strange. I did test that some on windows (spin blackbox on loopback). > I'll build it again. > > This matches earlier posts saying builds did not work outside of the > rxtx.org bins for w32. Strange. I wonder what I did. > > Could you try this: > > ftp://ftp.qbang.org/pub/rxtx/rxtxSerial.dll > > If this works, I'll replace it in the bins and toybox. As mentioned > earlier the fuserImp.c is not being linked in or put in the exports. > > I'm wondering why it didn't fail here. I thought I tested those > libraries. > > Fri Feb 24 19:39:48 $ nm ./i386-pc-mingw32/rxtxSerial.dll|grep psmisc > 1000c7d4 T > _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner at 12 > > Its there now. I put it into the Makefile locally. A better fix is > comming for builds. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From szabo.roland at mithrandir.hu Sat Feb 25 04:21:04 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Sat, 25 Feb 2006 12:21:04 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <20060223203102.55583.qmail@web53509.mail.yahoo.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> Message-ID: <44003DA0.707@mithrandir.hu> Hi! Your problem seems to be the following line: System.out.print(new String(readBuffer)); Every time a read event occurs, you convert your whole buffer (20 bytes) into a string, and print it out. You should only convert the amount you received. Something like this: System.out.print(new String(readBuffer, 0, numBytes)); Note that you would need to put this into your while loop. In this case you are lucky that after each DATA_AVAILABLE event you can only read once (no data arrives while you read, and everything fits into your buffer so your loop runs only once), otherwise data would be lost (overwritten in your buffer without being printed out). So this is what happens: 1. You read 'MNOSF85' but you print 20 chars 2. You read '43.', plus a new line, but after printing the 3 useful chars and the new line, you print more spaces (20 total chars), so your next line appears indented 3. etc. Roland Luiz Jr wrote: > > The problem is that not only the sent chars are > being displayed but some "empty" chars. > 'MNOSF85 43.' > 'MNOSF85 43.' > 878. From rajesh.invincible at gmail.com Mon Feb 27 02:47:26 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:17:26 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44003DA0.707@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> Message-ID: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Hello Mr *Szab?* Even i share the same problem with Luiz am receiving about 500 charecters from a PIC microcontroller(9600 bps,20MHz(PIC)*)CONTINUOSLY* Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF THEM HENCE THE SPACES. NOW WHAT DO I DO ? On 2/25/06, Szab? Roland wrote: > > Hi! > > Your problem seems to be the following line: > > System.out.print(new String(readBuffer)); > > Every time a read event occurs, you convert your whole buffer (20 bytes) > into a string, and print it out. You should only convert the amount you > received. Something like this: > > System.out.print(new String(readBuffer, 0, numBytes)); > > Note that you would need to put this into your while loop. In this case > you are lucky that after each DATA_AVAILABLE event you can only read > once (no data arrives while you read, and everything fits into your > buffer so your loop runs only once), otherwise data would be lost > (overwritten in your buffer without being printed out). > > So this is what happens: > > 1. You read 'MNOSF85' but you print 20 chars > 2. You read '43.', plus a new line, but after printing the 3 useful > chars and the new line, you print more spaces (20 total chars), so your > next line appears indented > 3. etc. > > Roland > > > > > Luiz Jr wrote: > > > > > The problem is that not only the sent chars are > > being displayed but some "empty" chars. > > > > 'MNOSF85 43.' > > 'MNOSF85 43.' > > 878. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7df1274/attachment-0003.html From rajesh.invincible at gmail.com Mon Feb 27 02:54:12 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 27 Feb 2006 15:24:12 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> Message-ID: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> On 2/27/06, Rajesh N wrote: > > Hello Mr *Szab?* > Even i share the same problem with Luiz > am receiving about 500 charecters from a PIC microcontroller(9600 > bps,20MHz(PIC)*)CONTINUOSLY* > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME PART OF > THEM HENCE THE SPACES. > > NOW WHAT DO I DO ? > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE SCREEN * CAN THREADS HELP ME BUT HOW?* *I have a while loop that reads the data and prints it* *do* *{* read(input,0,512); System.out.print(new String(input)); *}while(true);* The loop continues since the microcontroller continously sends data How to avoid being overwritten in bufferWHAT IS THE O.S(Linux) BUFFERS SIZE Expecting a reply soon yours sincerely Rajesh > On 2/25/06, Szab? Roland wrote: > > > > Hi! > > > > Your problem seems to be the following line: > > > > System.out.print(new String(readBuffer)); > > > > Every time a read event occurs, you convert your whole buffer (20 bytes) > > into a string, and print it out. You should only convert the amount you > > received. Something like this: > > > > System.out.print(new String(readBuffer, 0, numBytes)); > > > > Note that you would need to put this into your while loop. In this case > > you are lucky that after each DATA_AVAILABLE event you can only read > > once (no data arrives while you read, and everything fits into your > > buffer so your loop runs only once), otherwise data would be lost > > (overwritten in your buffer without being printed out). > > > > So this is what happens: > > > > 1. You read 'MNOSF85' but you print 20 chars > > 2. You read '43.', plus a new line, but after printing the 3 useful > > chars and the new line, you print more spaces (20 total chars), so your > > next line appears indented > > 3. etc. > > > > Roland > > > > > > > > > > Luiz Jr wrote: > > > > > > > > The problem is that not only the sent chars are > > > being displayed but some "empty" chars. > > > > > > > 'MNOSF85 43.' > > > 'MNOSF85 43.' > > > 878. > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060227/c7de789d/attachment-0003.html From tjarvi at qbang.org Mon Feb 27 10:48:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 10:48:41 -0700 (MST) Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: > The loop continues since the microcontroller continously sends data How > to avoid being overwritten in buffer. WHAT IS THE O.S(Linux) > BUFFERSSIZE > Expecting a reply soon > yours sincerely rxtx does not use buffers at all. You can use buffered input streams from the java API though. You may also want to look at the return value for read() to see how many bytes you did recieve. Printing more than you recieved would be a mistake as was mentioned earlier in the thread. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Mon Feb 27 16:26:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 27 Feb 2006 16:26:47 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) From tjarvi at qbang.org Mon Feb 27 19:44:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Feb 2006 19:44:17 -0700 (MST) Subject: [Rxtx] Love RXTX (fwd) Message-ID: Looks like a good bug to dig into. ---------- Forwarded message ---------- Date: Mon, 27 Feb 2006 21:39:21 -0500 From: Beat Arnet tjarvi at qbang.org Subject: Love RXTX Hi Trent, I just switched from javax.comm to gnu.io and it has worked great for me so far. A subtle difference that I noticed is that while javax.comm tolerates closing the serial port from within a serial event, gnu.io hangs indefinietly. Thanks for providing this great package! I will send you some screen shots in the near future. Regards, Beat From szabo.roland at mithrandir.hu Tue Feb 28 02:38:58 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 10:38:58 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> Message-ID: <44041A32.8000808@mithrandir.hu> Hi, > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > PART OF THEM HENCE THE SPACES. Well, Trent has already answered your question, but maybe it would be easier to understand an actual code example: byte buffer[] = new byte[BUFFER_SIZE]; do { int received = inputStream.read(buffer, 0, BUFFER_SIZE); System.out.println("Received "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, 0, received)); } while(true); Maybe I was not clear before, but `new String(buffer)` creates a String, that has a length equal to the length of the byte array parameter. The read method above may return up to BUFFER_SIZE bytes, but it can, and usually does return less. That's why it is important, that you create your string only from the first `received` number of bytes, which, again, can be less, than the length of your buffer. The remaining bytes are garbage, or the remainder of your previous read. You should check the javadoc for the String class to see what kind of constructors it has. You can, for example, use different encodings, etc. > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > SCREEN * CAN THREADS HELP ME BUT HOW?* You don't need threads for that. If you use the available() function, you can allways read without blocking, I guess. You have to make sure, though, that you print out only what you receive. You can of course use threads if you don't want your application blocked even for the duration of the read call, or you don't want to poll the available() function, in which case you would simply put your serial port handling code (read and all) into a separate thread, but than you would need to synchronize your operations with your main thread. I guess your real question is how you can read a specific amount of data, if that damn ;) read function can return less than what you ask for: If you know how many bytes you want to receive (for example, a data packet with specific length), you need to _append_ the result of a read operation _after_ your previous read. You'd usually use a variable to hold your current position: byte buffer[] = new byte[BUFFER_SIZE]; int want_to_receive = 100; //we need e.g. 100 bytes int seek = 0; //points to the end of last read operation do { int received = inputStream.read(buffer, seek, want_to_receive); System.out.println("Received a chunk of "+received+" bytes"); System.out.println("Received data as String: "+ new String(buffer, seek, received)); seek += received; want_to_receive -= received; } while(want_to_receive > 0); //here, we have `want_to_receive` number of bytes in the buffer. System.out.println("Received the required amount of data"); Note that the receiving of that 100 bytes can be a result of any number of read calls (well, actually 100 at most, I think). But hey, this is general programming, not specific to serial ports, or RXTX at all. You must carefully consult the documentation (what documentation?! :) ), or code examples, to see how each API function works. > WHAT IS THE O.S(Linux) BUFFERS SIZE I really don't think that would be relevant. You use as large buffer as you need depending on the needs of your application, and let the OS use as large a buffer as it wants for its internal operations, or possibly use none at all. Your only concern is the read operation, which fills up some of your buffer with the data read from the port, and than returns how many bytes it actually read. How the OS does it? You don't need to care (most of the time). Roland From rajesh.invincible at gmail.com Tue Feb 28 06:03:35 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:33:35 +0530 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <44041A32.8000808@mithrandir.hu> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> Message-ID: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Thanks Szabo But i have a doubt plz dont mind I would like to know tat constant which u used BUFFER_SIZE --- what is it is it a predefined constant what do u mean by this By ur mail i have understood 3 ways to proceed 1. Print only the received no. of bytes and not all the string 2. Use the available function or the Data_available event(I DIDN'T UNDERSTAND THIS) 3. My microcontroller sends 65535 bytes in one set(255 bytes repaeated 255 times) So im thinkin i would repeat the loop for some 10000 times(ie 10000 reads giving me 10000 bytes and thereafter for 65000 later ) On 2/28/06, Szab? Roland wrote: > > Hi, > > > Now I TOO AM RECEIVING SPACES IN BETWEEN THE ACTUAL DATA > > I AM RECEIVING THE DATA AS I PRINT THEM SO I MUST BE MISSING SOME > > PART OF THEM HENCE THE SPACES. > > Well, Trent has already answered your question, but maybe it would be > easier to understand an actual code example: > > byte buffer[] = new byte[BUFFER_SIZE]; > do { > int received = inputStream.read(buffer, 0, BUFFER_SIZE); > System.out.println("Received "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, 0, received)); > } while(true); > > Maybe I was not clear before, but `new String(buffer)` creates a String, > that has a length equal to the length of the byte array parameter. The > read method above may return up to BUFFER_SIZE bytes, but it can, and > usually does return less. That's why it is important, that you create > your string only from the first `received` number of bytes, which, > again, can be less, than the length of your buffer. The remaining bytes > are garbage, or the remainder of your previous read. You should check > the javadoc for the String class to see what kind of constructors it > has. You can, for example, use different encodings, etc. > > > HOW DO I MANAGE BOTH RECEIVING WITHOUT LOSS AND PRINTING ON THE > > SCREEN * CAN THREADS HELP ME BUT HOW?* > > You don't need threads for that. If you use the available() function, > you can allways read without blocking, I guess. You have to make sure, > though, that you print out only what you receive. You can of course use > threads if you don't want your application blocked even for the duration > of the read call, or you don't want to poll the available() function, in > which case you would simply put your serial port handling code (read and > all) into a separate thread, but than you would need to synchronize your > operations with your main thread. > > I guess your real question is how you can read a specific amount of > data, if that damn ;) read function can return less than what you ask for: > > If you know how many bytes you want to receive (for example, a data > packet with specific length), you need to _append_ the result of a read > operation _after_ your previous read. You'd usually use a variable to > hold your current position: > > byte buffer[] = new byte[BUFFER_SIZE]; > int want_to_receive = 100; //we need e.g. 100 bytes > int seek = 0; //points to the end of last read operation > do { > int received = inputStream.read(buffer, seek, want_to_receive); > System.out.println("Received a chunk of "+received+" bytes"); > System.out.println("Received data as String: "+ > new String(buffer, seek, received)); > seek += received; > want_to_receive -= received; > } while(want_to_receive > 0); > > //here, we have `want_to_receive` number of bytes in the buffer. > System.out.println("Received the required amount of data"); > > Note that the receiving of that 100 bytes can be a result of any number > of read calls (well, actually 100 at most, I think). But hey, this is > general programming, not specific to serial ports, or RXTX at all. You > must carefully consult the documentation (what documentation?! :) ), or > code examples, to see how each API function works. > > > WHAT IS THE O.S(Linux) BUFFERS SIZE > > I really don't think that would be relevant. You use as large buffer as > you need depending on the needs of your application, and let the OS use > as large a buffer as it wants for its internal operations, or possibly > use none at all. Your only concern is the read operation, which fills up > some of your buffer with the data read from the port, and than returns > how many bytes it actually read. How the OS does it? You don't need to > care (most of the time). > > Roland > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/2d8bf804/attachment-0003.html From gildedfalcon at googlemail.com Tue Feb 28 06:05:44 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Tue, 28 Feb 2006 14:05:44 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya! Well, this does not seem to be the solution. I've added the following lines to my code: System.out.println("Flowcontrol: " + serialPort.getFlowControlMode()); System.out.println("Treshold: " +serialPort.getReceiveThreshold()); System.out.println("Timeout: " + serialPort.getReceiveTimeout()); The Output is on each of those three '0' - on both systems, linux and windows. So I think the point has to be somewhere else... Any Idea ? 2006/2/23, Philipp Kemmeter : > Okay, thanks alot so far. I will freeze the project till tuesday, > because we have vacations here. I'm going to try the things you've > said then. > > Phil > > 2006/2/23, Trent Jarvi : > > > > Hi Philipp > > > > You will want to set the following explicitly when you are unsure and > > seeing differences between windows and linux. > > > > timeout > > treshold > > flow control mode (none xon/xoff hardware/... > > > > These are all in the javadoc for sun's CommAPI. You can probably see what > > windows has set too. > > > > The defaults are whatever the OS is doing. Usually thats right. But I've > > not characterized them. I don't think sun documented defaults either. > > > > So one of the above could be causing the issue. Especially flow control. > > > > I can say more Sunday if you still have problems. I'm getting ready to > > head back home. > > > > On Thu, 23 Feb 2006, Philipp Kemmeter wrote: > > > > > Well, I think I give you the code. Look at it, if you want to. > > > > > > /** Method to initialize the serial port and set up the > > > * input and output streams > > > * > > > */ > > > public Receiver() { > > > Enumeration portList; // will hold all the ports available on the system > > > CommPortIdentifier portId = null; // will hold the current single > > > port as we loop hrough all available in the system > > > SerialPort serialPort = null; // this will hold the serial port > > > choosen to be used > > > boolean portFound = false; // wether the decided port was found or > > > not (if not, maybe it's blocked by another application) > > > > > > // get all avaliable ports in the system > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > // loop through all ports and find the desired port to use > > > while (portList.hasMoreElements() && !portFound) { > > > > > > // get the port id > > > portId = (CommPortIdentifier) portList.nextElement(); > > > // check and make sure port type is serial (and not paralel or other) > > > if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) { > > > // then check that the port is the requested one > > > System.out.println(portId.getName()); > > > if(portId.getName().equalsIgnoreCase(port)) { > > > try { > > > portFound = true; > > > // Open the serial port. The name is unimportant, > > > // The second (timeout) parameter is unimplemented > > > serialPort = (SerialPort) portId.open("Pic Receiver",30*1000); > > > // Set the baud rate, etc, use 115 kbaud to make it more stressful > > > > > > serialPort.setSerialPortParams(BAUD, DATABITS, STOPBITS, PARITY); > > > > > > //System.out.println("Serial Port free"); > > > // Register for notification of data changes > > > try { > > > serialPort.addEventListener(this); > > > } > > > catch (Exception tml) { > > > System.out.println("addEventListener error " + > > > tml.toString() + ": " + tml.getMessage()); > > > System.exit(1); > > > } > > > SerialPort.notifyOnDataAvailable(true); > > > // Get output and input streams > > > outStream = serialPort.getOutputStream(); > > > inStream = serialPort.getInputStream(); > > > > > > } catch (UnsupportedCommOperationException ucoe) { > > > System.out.println("Error: UnsupportedCommOperationException"); > > > System.exit(1); > > > } catch (PortInUseException piue) { > > > System.out.println("Error: PortInUseException"); > > > System.exit(1); > > > } catch (java.io.IOException ioe) { > > > System.out.println("Error: IOException"); > > > System.exit(1); > > > } > > > } //end if > > > } // end if > > > } // end while > > > if (portFound) > > > System.out.println("Server up, waiting for data..."); > > > else { > > > System.out.println("Error: Did not found the given port to listen. > > > Maybe it's blocked by another application or it simply does not > > > exist."); > > > System.exit(0); > > > } > > > } // end method > > > > > > /** Javax.comm will call this method whenever a Data Available event occurs > > > * On serial ports without hardware flow control this is the only > > > event supported. > > > * This means the onboard UARTs of JStamp/JStik/SaJe > > > * > > > * @params ev this is the serial event > > > */ > > > public void serialEvent(SerialPortEvent ev) { > > > try { > > > // only event supported on the aj100 > > > if (ev.getEventType() == SerialPortEvent.DATA_AVAILABLE) { > > > try { > > > /* If contentLength isn't set yet, then the header has not > > > been send properly. > > > * Thus, it is first nessesary to parse the header to know, > > > how many bytes are needed to get. > > > */ > > > > > > // [... the parser was here - it's cut out because it does > > > not really matter. It initializes contentLenght...] > > > > > > rcvBytes = new byte[contentLength]; > > > > > > /* Now just read the files. The Buffer should be big enough for > > > * our needs > > > */ > > > byte[] readBuffer = new byte[2048]; > > > while (inStream.available() > 0) { > > > int numBytes = inStream.read(readBuffer); > > > for (int i = 0; i < numBytes; i++) { > > > rcvBytes[i+rcvByteCount] = readBuffer[i]; > > > } > > > > > > rcvByteCount += numBytes; > > > > > > System.out.println(rcvByteCount); > > > } > > > > > > /* Storing the arrived data and resetting the Receiver when > > > the file has arrived. */ > > > if (rcvByteCount >= contentLength) { > > > System.out.println("done"); > > > contentLength = 0; > > > rcvByteCount = 0; > > > } > > > > > > } catch (IOException e) { > > > System.out.println("IOException caught in serialEvent"); > > > } > > > } > > > } catch (Exception e) { > > > System.out.println("Exception caught outside serialEvent: " + e.toString()); > > > e.printStackTrace(); > > > } > > > > > > } // end serialEvent > > > > > > > > > > > > > > > 2006/2/23, Philipp Kemmeter : > > >> Heya! > > >> > > >>> > > >>> Have you turned on hardware flow control? Doing a cat suggests some parts > > >>> of the driver are correct. If its open source, the odds are good the > > >>> entire driver is correct. But cat does not do very much. > > >>> > > >> > > >> Well, I don't know exactly, what you mean and where to do this. The > > >> java-application works fine on the windows-machine, thus the setting > > >> there should be correct. Also the mobile device I am using (Nokia N90) > > >> is the same and working with the windows machine. Thus the settings > > >> there should be correct to. What is left is the mobile device with > > >> arm-linux on it. But cat is working fine there. > > >> Any further details/suggestions ? > > >> > > >>> If someone wants to do something with rxtx 2.0 they can. I will not be > > >>> looking at it until after the known issues are resolved and sun offers a > > >>> release or prerelease to work with. It's a waste of time until then. > > >>> > > >>> But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native > > >>> code with just some names changed to protect the inocent. > > >> > > >> I trust you in this. But what to do know? > > >> > > >> Do you want to look at my code and check it? > > >> > > >> Phil > > >> > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From rajesh.invincible at gmail.com Tue Feb 28 06:15:55 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 28 Feb 2006 18:45:55 +0530 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit In-Reply-To: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0348467F@hqexchange3.dot.state.co.us> Message-ID: <6b2c65f0602280515l67654d85hb632ab6f734c4960@mail.gmail.com> Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the */usr/lib * 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: > > Hi, > We installed the new rxtx 2.1.7 (final version) on the 64 bit > machines. And when I run the SimpleRead program I am getting > "java.lang.UnsatisfiedLinkError" see detailed error below. > > We copied the binaries from > ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn > own-linux-gnu/ > > Here is some of the system information > -sh-3.00$ rpm -q glibc > glibc-2.3.4-2.13 > > -sh-3.00$ rpm -q binutils > binutils-2.15.92.0.2-15 > > -sh-3.00$ uname -a > Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan > 5 17:11: > 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux > > > we are using BEA JRockit JVM :) > -sh-3.00$ java -version > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build > ari-38317-20041124-1225-l > inux-ia32, Native Threads, GC strategy: parallel) > > Does anybody has any ideas why I am getting this error ? > > Thanks in advance > ~pawan > > > -sh-3.00$ java SimpleRead /dev/cub00 > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory th > rown while loading gnu.io.RXTXCommDriver > java.lang.UnsatisfiedLinkError: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 > 6/librxtxSerial-2.1-7.so: > /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr > xtxSerial-2.1-7.so: cannot open shared object file: No such file or > directory > at > java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String;)I(Unknown > Source) > at > java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( > Unknown Source) > at > java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; > Z)V(Unknown Source) > at > java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( > Unknown Source) > at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown > Source) > at > gnu.io.CommPortIdentifier.()V(CommPortIdentifier.java:83) > at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) > at jrockit.vm.RNI.trampoline()V(Unknown Source) > at > gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava.util.Enumeration; > (CommPortIdentifier.java:???) > at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/f62c94a5/attachment-0003.html From Pawan.Kharbanda at dot.state.co.us Tue Feb 28 09:20:26 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 28 Feb 2006 09:20:26 -0700 Subject: [Rxtx] Problems with rxtx on Linux 64 Bit Message-ID: <939A619A756047469C41EE9BA51890FB034846B9@hqexchange3.dot.state.co.us> Rajesh, Thanks for the quick reply. We tried exporting LD_LIBRARY_PATH, we also tried building the RXTX binaries using the source, but getting the same result. Just curious, is anyhting major changed in between rxtx2.1.7pre17 and the latest release. We were running our application in production for almost a year using the older api's,but now when i am trying to upgrade it is causing all kind of issues with rxtx on both (32 and 64 bit linux machines). Thanks ~pk ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Rajesh N Sent: Tuesday, February 28, 2006 6:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] Problems with rxtx on Linux 64 Bit Hi Mr. pawan i can tell u by that exception that 1.ur shares object files are not properly set in the /usr/lib 2. u may not have done this export LD_LIBRARY_PATH=/usr/lib 3. just check whether u have the java runtime environment also installed -- this may not be the right answer Anyway also check the java documentation for the details of that exception On 2/28/06, Kharbanda, Pawan wrote: Hi, We installed the new rxtx 2.1.7 (final version) on the 64 bit machines. And when I run the SimpleRead program I am getting "java.lang.UnsatisfiedLinkError" see detailed error below. We copied the binaries from ftp://ftp.qbang.org/pub/rxtx/lastbuild/rxtx-2.1-7-bins/Linux/x86_64-unkn own-linux-gnu/ Here is some of the system information -sh-3.00$ rpm -q glibc glibc-2.3.4-2.13 -sh-3.00$ rpm -q binutils binutils-2.15.92.0.2-15 -sh-3.00$ uname -a Linux tocrhstg03.cdot-toc.state.co.us 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11: 56 EST 2006 x86_64 x86_64 x86_64 GNU/Linux we are using BEA JRockit JVM :) -sh-3.00$ java -version java version "1.4.2_05 " Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) BEA WebLogic JRockit(TM) 1.4.2_05 JVM R24.4.1-1 (build ari-38317-20041124-1225-l inux-ia32, Native Threads, GC strategy: parallel) Does anybody has any ideas why I am getting this error ? Thanks in advance ~pawan -sh-3.00$ java SimpleRead /dev/cub00 java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory th rown while loading gnu.io.RXTXCommDriver java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.4.2-bea-1.4.2.05/jre/lib/i38 6/librxtxSerial-2.1-7.so: /usr/lib/jvm/java- 1.4.2-bea-1.4.2.05/jre/lib/i386/libr xtxSerial-2.1-7.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String ;)I(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File;)Z( Unknown Source) at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String; Z)V(Unknown Source) at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String;)V( Unknown Source) at java.lang.System.loadLibrary(Ljava.lang.String;)V(Unknown Source) at gnu.io.CommPortIdentifier .()V(CommPortIdentifier.java:83) at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source) at jrockit.vm.RNI.trampoline()V(Unknown Source) at gnu.io.CommPortIdentifier.getPortIdentifiers ()Ljava.util.Enumeration; (CommPortIdentifier.java:???) at SimpleRead.main([Ljava.lang.String;)V(SimpleRead.java:43) _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060228/96a5850a/attachment-0003.html From szabo.roland at mithrandir.hu Tue Feb 28 09:47:35 2006 From: szabo.roland at mithrandir.hu (=?ISO-8859-1?Q?Szab=F3_Roland?=) Date: Tue, 28 Feb 2006 17:47:35 +0100 Subject: [Rxtx] En: Unwanted data in output! In-Reply-To: <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> References: <20060223203102.55583.qmail@web53509.mail.yahoo.com> <44003DA0.707@mithrandir.hu> <6b2c65f0602270147x54d751bdlcb7f98cfc98195d3@mail.gmail.com> <6b2c65f0602270154g71c9b92kb1e43160acd7e99a@mail.gmail.com> <44041A32.8000808@mithrandir.hu> <6b2c65f0602280503i4961fc97r4cc802fda977141c@mail.gmail.com> Message-ID: <44047EA7.3050408@mithrandir.hu> Rajesh, I think you need to concentrate on understanding some of the api functions in the InputStream class, than you will have an easier time using them, so I'd suggest trying here: http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html Reading that will explain how the various versions of read, and the available function work. Note that the default implementation of available() is returning 0, but it is overwritten in RXTX to really return the number of bytes available. I don't think this is the place to go into general programming issues, like algorithms and multithreading, or how a system call is handled by on operating system, but here are a few hints. Adapting my previous example for your needs, here is a set of functions that would read your data: //this functions reads the given amount of data public void readData( InputStream inpuStream, byte[] buffer, int length) throws IOException { if (length >= buffer.length) throw new IllegalArgumentException("Buffer is too small"); int seek = 0; //points to the end of last read operation int received; do { received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; } while(length > 0); } public void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really try { InputStream inputStream = port.getInputStream(); readData(inputStream, buffer, 65535); //here you have the buffer variable filled with 65535 bytes of data } catch (IOException e) { e.printStackTrace(); } } Now, if you think about it, reading 65535 bytes from a serial device might take a while. So if you call this function from your only main thread, your application will not respond while it is reading. If this is an issue (e.g. when you have a user interface), you can call this function in another thread, or you can call available() to see if there is anything to read, and if there is, read it, otherwise do your normal thing with your application. Thread version: boolean finished = false; new Thread() { public void run() { someFunction(); finished = true; } }.start(); //now your main thread can continue its work, while the other thread does the reading from the serial device on another. When reading is done, it will set the finished variable to true. Poll version: This is a little more complicated, you need to modify the above readData function, and have it save its internal state and return whether it has finished reading. If not call it again. Something like this: byte[] buffer = null; int seek = 0; int length = 0; InputStream stream = null; //here you specify how many bytes you want to read and where void prepareRead(InputStream stream, byte[] buffer, int length) { if (buffer.length <= length) throw new IllegalArgumentException("Buffer is too small"); this.buffer = buffer; this.stream = stream; this.seek = 0; this.length = length; } //returns true when done boolean readData() throws IOException { if (length <= 0) return true; if (stream.available <= 0) return false; int received = inputStream.read(buffer, seek, length); System.out.println("Read "+received+" bytes."); seek += received; length -= received; return length == 0; } //this is how you use it: void someFunction() { byte[] buffer = new byte[65535]; //the size is your choice really, it can be bigger if sometimes you need more try { InputStream inputStream = port.getInputStream(); prepareRead(inputStream, buffer, 65535); while (!readData()) { //here you can do anything while you wait for all your data } //now you received all of it } catch (IOException e) { e.printStackTrace(); } } If these latter examples are confusing, just try the first one, and see what it prints out. What you use for buffer size is entirely your choice, it should be the maximum amount of data that you want to handle at once. So if you have say data packages with 200-300 bytes in size, you would use a buffer with 300 bytes. If you want to see 65535 bytes of data all together, that's the size of buffer you want to go with. Roland From sven.ahlemann at web.de Wed Feb 15 11:20:56 2006 From: sven.ahlemann at web.de (Sven Ahlemann) Date: Wed, 15 Feb 2006 18:20:56 -0000 Subject: [Rxtx] Question about Serial I/O under Win32 References: <662084330@web.de> Message-ID: <001301c631b6$4d2902a0$fd45a8c0@merkur> Thanks Trent for the answer!! Regards, --Sven ----- Original Message ----- From: "Trent Jarvi" To: "RXTX Developers and Users" Sent: Monday, February 13, 2006 5:13 AM Subject: Re: [Rxtx] Question about Serial I/O under Win32 > On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > >> Hello everybody, >> >> I have a strange problem with a piece of code I made for myself. No, this >> is not really concerning rxtx, but nevertheless I post this to the list, >> hoping that some of you can help me. I've written two libraries, one for >> linux and one for win32. The linux port works quite well, I can send / >> receive faxes and / or replay voice messages over the telephone line >> using a voice modem. But the win32 port of the library causes some >> trouble. If, for example, I send out a fax with a certain modem under >> linux, it works well. The fax is complete when it comes out of the fax >> machine. If I then use the same modem to send out a fax under win32, the >> fax coming out of the fax machine gets "stuck" halfways, but the sending >> modem thinks that transmission was ok and drops the connection. The >> answering fax machine then gives me "error while receiving." The "upper >> layer" java code MUST be right, because if I do the same thing under >> linux (using the linux library), everything is alright. Now I have to >> ask: Can somebody please help me out with this??!? Could it be the case >> that some kind of flow control or COMMTIMEOUTS setting causes this >> behaviour? I set flow control to RTS/CTS before sending out a fax. How >> can I DISABLE flow control? Or what do you think? Can something else >> cause this problems? Thank you all for your time and PLEASE write back >> soon. >> > > Hi Sven > > I'm not too willing to talk about flow control at the low level until I > confirm some things with test equipment later. > > It is not clear if you are using rxtx or writing your own native code. So > I'm not sure how to answer much of this :) If you are wondering how to > change the flow control using rxtx from java, The BlackBox example from > Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the > following: > > SerialPort.java: public static final int FLOWCONTROL_NONE =0; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; > SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT > =2; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN > =4; > SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; > > > So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it > off. > > If you are looking for how to do it in native code, the rxtx Source is > SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with > SerialImp.c) You can track the code: > > SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, > jobject jobj, jint flowmode ) > > termios.c:int tcgetattr( int fd, struct termios *s_termios ) > termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) > > There may be a problem in the rxtx flow control code though. Rather than > guess, I want to test this with a gold standard. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Wed Feb 1 13:47:59 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 13:47:59 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild Message-ID: I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 14:19:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 13:19:00 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Trent, We verified that the writeArray is NOT a problem when NOT using the Digi PortServer. We are following that thread now. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 12:48 PM To: rxtx at qbang.org Subject: [Rxtx] New Linux binary in lastbuild I inadvertantly compiled linux bins with the wrong gcc (4.1?). I think this is why the linux 2.4 enterprise linux was not working. I've recompiled the same source with gcc 2.96 and placed it in lastbuild. I've also managed to start building cross compilers after several attempts at creating sane chroots. They are spitting out as fast as possible with my 1.5 ghz/256 meg machine. I don't know if I'll stop making cross compilers today or tomorrow but thats when the bins will be released. I wont have to do this again for a while I hope. The next time it will be much faster. If people are interested when I'm done, I could burn dvds of the cross building environment and send them out. It really is a pain if you don't start on the right foot. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 1 15:11:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 15:11:17 -0700 (MST) Subject: [Rxtx] New Linux binary in lastbuild In-Reply-To: References: Message-ID: On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Wed Feb 1 15:41:33 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Wed, 1 Feb 2006 14:41:33 -0800 Subject: [Rxtx] New Linux binary in lastbuild Message-ID: Unfortunately they're not Java people. I'll talk to them tomorrow and see if they have any timeouts inherent in their device driver that could be screwing us both up. I'll fill you in if I find anything out. -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Wednesday, February 01, 2006 2:11 PM To: RXTX Developers and Users Subject: RE: [Rxtx] New Linux binary in lastbuild On Wed, 1 Feb 2006, Morpeth, Chris wrote: > Trent, > > We verified that the writeArray is NOT a problem when NOT using the Digi > PortServer. We are following that thread now. > Hi Chris I'd be glad to work with them if it helps. I'm not sure whats up. Maybe it is something rxtx is doing. I can give them a complementary copy of rxtx :) -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Saul.Finkelstein at sbcglobal.net Wed Feb 1 18:09:45 2006 From: Saul.Finkelstein at sbcglobal.net (Saul Finkelstein) Date: Wed, 01 Feb 2006 17:09:45 -0800 Subject: [Rxtx] Java USB Observations. In-Reply-To: <20060130172403.GA10728@freehold.crocodile.org> References: <20060130172403.GA10728@freehold.crocodile.org> Message-ID: <43E15BD9.5070608@sbcglobal.net> Vadim Tkachenko wrote: > My guess is that David is extremely busy and jUSB just > slipped out of his priority list. Trent Jarvi wrote: > And we have the hobby guys trying to look like professionals: > http://jusb.sourceforge.net/ Gerrit Telkamp wrote: > In my opinion the easiest & most promising way to get a > platform-independent library for USB is to write a JNI > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > [...] > > Ok, to get compatible to the Java Specification Request > 80 might be difficult going this way, but libusb is more > probising than the "offical" way. Trent Jarvi wrote: > If I read things correctly, the JCP did like I've seen > before; blindside projects like a 600 lb barnie the > dinosaur flinging its tail in a china shop. The 600 lb > barnie is easy to get used to. Its the blindsiding that > takes the steam out of projects. Folks, I'm not sure of the makeup of this list, but let me add my opinion concerning this thread. As a professional software developer that makes products that people use and that I have to support, I'm not interested in basing my product on some hacks that are out there and which were done because people don't like to work within an existing framework that consists of other developers and other organizations that are trying to develop an API and an implementation that is stable, feature-rich and supported by more than one guy on his Linux box in his bedroom when he seems to have some time for it in between watching episodes of Lost. Sure, organizations like the JCP can appear to be big and cumbersome at times, but they (and other similar organizations) exist so that we don't have a mish-mash of random APIs that part-time developers threw together to solve The Problem De Juer. The function of organizations like the JCP is to develop APIs and implementations that work for a lot of different applications and in a lot of different environments. Think for a moment if no one followed the Internet RFC's because the RFC process was "too cumbersome" and it sure would be a lot faster just to hack something together in your spare time to let one Linux box talk to another Linux box over the net - that is, until you got tired of that project and moved on to something else. Where would we be today in terms of how universally technologies such as Ethernet and WiFi are available and interoperable? As for the comment on the JCP being a "600 lb barnie the dinosaur" I have to ask - have any of you (with the exception of Paul Klissner) ever worked with the JCP on anything, or are the comments on the JCP just a knee-jerk reaction that is based on emotion rather than facts? Saul From tjarvi at qbang.org Wed Feb 1 22:10:41 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 1 Feb 2006 22:10:41 -0700 (MST) Subject: [Rxtx] Pending Download/Install Issues Message-ID: I just wanted to mention this so Doug could think about it a little. Maybe others will have some thoughts. I'm creating cross compilers to have binaries for as many platforms as possible. Linux is going to be about 30 different binaries. Net and FreeBSD will bring it around 50-60 total I'm guessing. Then there will be a second pass with uclib for embeded devices. It's going to balloon. rxtx uclib for s390 does not make a great deal of sense but at this point. Java may not even run on everything. Some of these are for embeded devices obviously. But I know people use rxtx on them. I'm just swathing with hairy scripts. I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and maybe x86 freebsd in a zipfile. The rest I'll just put in a directory structure on ftp by OS, cpu, libc and call it the Toybox-version. alpha-unknown-linux-gnu/ arm-9tdmi-linux-gnu/ armeb-unknown-linux-gnu/ arm-iwmmxt-linux-gnu/ arm-softfloat-linux-gnu/ arm-unknown-linux-gnu/ i686-unknown-linux-gnu/ mips-unknown-linux-gnu/ sparc64-unknown-linux-gnu/ sparc-unknown-linux-gnu/ ... Any thoughts? -- Trent Jarvi tjarvi at qbang.org From g.telkamp at domologic.de Thu Feb 2 02:24:12 2006 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Thu, 2 Feb 2006 10:24:12 +0100 Subject: [Rxtx] Java USB Observations. In-Reply-To: <43E15BD9.5070608@sbcglobal.net> References: <20060130172403.GA10728@freehold.crocodile.org> <43E15BD9.5070608@sbcglobal.net> Message-ID: <355558406.20060202102412@domologic.de> I think everyone agrees with you that JCP is a very important instrument to standardize the Java technology. There is no alternative solution. But unfortunately, the real world is more complex. If I would have to develop software for a project where USB is a requirement, I would prefer to implement this in Java using a non-standarized USB library than to implement this in C using the Windows API. You can not go to your customer and tell him "Oh, sorry for the bugs, but they are caused by a library that has not been developed by me". And also if you think of RxTx - this project was born because the official and standarized way had chuckholes. Sometimes its better to go an unconvential way than to wait until the cows comes home. Gerrit. > Vadim Tkachenko wrote: >> My guess is that David is extremely busy and jUSB just > > slipped out of his priority list. > Trent Jarvi wrote: > > And we have the hobby guys trying to look like professionals: > > http://jusb.sourceforge.net/ > Gerrit Telkamp wrote: > > In my opinion the easiest & most promising way to get a > > platform-independent library for USB is to write a JNI > > wrapper for libusb (maybe using the gnu.io.*-namespace?). > > > > [...] > > > > Ok, to get compatible to the Java Specification Request > > 80 might be difficult going this way, but libusb is more > > probising than the "offical" way. > Trent Jarvi wrote: > > If I read things correctly, the JCP did like I've seen > > before; blindside projects like a 600 lb barnie the > > dinosaur flinging its tail in a china shop. The 600 lb > > barnie is easy to get used to. Its the blindsiding that > > takes the steam out of projects. > Folks, I'm not sure of the makeup of this list, but let > me add my opinion concerning this thread. As a professional > software developer that makes products that people use and > that I have to support, I'm not interested in basing my > product on some hacks that are out there and which were > done because people don't like to work within an existing > framework that consists of other developers and other > organizations that are trying to develop an API and an > implementation that is stable, feature-rich and supported > by more than one guy on his Linux box in his bedroom when > he seems to have some time for it in between watching > episodes of Lost. > Sure, organizations like the JCP can appear to be big and > cumbersome at times, but they (and other similar organizations) > exist so that we don't have a mish-mash of random APIs that > part-time developers threw together to solve The Problem > De Juer. The function of organizations like the JCP is to > develop APIs and implementations that work for a lot of > different applications and in a lot of different environments. > Think for a moment if no one followed the Internet RFC's > because the RFC process was "too cumbersome" and it sure > would be a lot faster just to hack something together in > your spare time to let one Linux box talk to another Linux > box over the net - that is, until you got tired of that > project and moved on to something else. Where would we be > today in terms of how universally technologies such as > Ethernet and WiFi are available and interoperable? > As for the comment on the JCP being a "600 lb barnie > the dinosaur" I have to ask - have any of you (with the > exception of Paul Klissner) ever worked with the JCP on > anything, or are the comments on the JCP just a knee-jerk > reaction that is based on emotion rather than facts? > Saul > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Feb 2 06:54:38 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 02 Feb 2006 08:54:38 -0500 Subject: [Rxtx] Pending Download/Install Issues In-Reply-To: References: Message-ID: Hi All, I like the idea of making sure that there is one platform upon which we can build for many. This enables the creation of a master copy of the source code. Having multiple copies of the source code floating around is a fruitful source of bugs, for me. When source is updated with out the version number being updated the bug bites with a vengeance. The approach, outlined below, also addresses the deployment itch. I have been using signed jars, in jnlp, to download RXTX with web-start. Beaming over signed jar files (for applications) might be just as good. The approach requires, however, that we either obtain write access to sensitive areas of the jdk home directory, or use reflection to hack into the java.library.path API to enable its updating (which seems, oddly enough, to work!). So, if we obtain a consistent deployment of signed jar files that contain the binary, it would be idea, IMHO. Authors could check for the binary, recover from the error that results when it is not there, then load it from the web. During the loading process, it is a simple matter to verify the jar signing. The Net effect will be to create a library that can be deployed automatically. This approach, if successful, directly impacts the configuration problem for native method maintainers across the globe. It impacts RXTX, JAI, Java 3D, etc...IMHO. Gee, perhaps we should get a software patent ;) Any IP lawyers out there? - Doug >I just wanted to mention this so Doug could think about it a little. >Maybe others will have some thoughts. I'm creating cross compilers >to have binaries for as many platforms as possible. Linux is going >to be about 30 different binaries. Net and FreeBSD will bring it >around 50-60 total I'm guessing. Then there will be a second pass >with uclib for embeded devices. It's going to balloon. > >rxtx uclib for s390 does not make a great deal of sense but at this >point. Java may not even run on everything. Some of these are for >embeded devices obviously. But I know people use rxtx on them. I'm >just swathing with hairy scripts. > >I think for ftp from qbang, I'll put x86 linux,mac os x, win32 and >maybe x86 freebsd in a zipfile. The rest I'll just put in a >directory structure on ftp by OS, cpu, libc and call it the >Toybox-version. > >alpha-unknown-linux-gnu/ >arm-9tdmi-linux-gnu/ >armeb-unknown-linux-gnu/ >arm-iwmmxt-linux-gnu/ >arm-softfloat-linux-gnu/ >arm-unknown-linux-gnu/ >i686-unknown-linux-gnu/ >mips-unknown-linux-gnu/ >sparc64-unknown-linux-gnu/ >sparc-unknown-linux-gnu/ >... > >Any thoughts? > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Feb 3 00:22:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 3 Feb 2006 00:22:46 -0700 (MST) Subject: [Rxtx] Update Message-ID: I wanted to release mips, ppc and arm binaries. These are everything from handheld devices to Apple hardware running linux (linux people love mac hardware). It's going to work! But there are still 4 more hours of compiling cross compilers to go to finish ppc. I'm going to get some sleep as I expect a call early in the morning. So here are the platforms that compiled libc (99% chance they will work). ./alpha-unknown-linux-gnu/lib/libc.so ./arm-9tdmi-linux-gnu/lib/libc.so ./armeb-unknown-linux-gnu/lib/libc.so ./arm-iwmmxt-linux-gnu/lib/libc.so ./arm-softfloat-linux-gnu/lib/libc.so ./arm-unknown-linux-gnu/lib/libc.so ./armv5b-softfloat-linux/lib/libc.so ./arm-xscale-linux-gnu/lib/libc.so ./i386-unknown-linux-gnu/lib/libc.so ./i686-unknown-linux-gnu/lib/libc.so ./ia64-unknown-linux-gnu/lib/libc.so ./m68k-unknown-linux-gnu/lib/libc.so ./mipsel-unknown-linux-gnu/lib/libc.so ./mips-unknown-linux-gnu/lib/libc.so ./powerpc-405-linux-gnu/lib/libc.so ./powerpc-440-linux-gnu/lib/libc.so ./powerpc-604-linux-gnu/lib/libc.so ./powerpc-7450-linux-gnu/lib/libc.so ./powerpc-750-linux-gnu/lib/libc.so ./sparc64-unknown-linux-gnu/lib64/libc.so ./sparc-unknown-linux-gnu/lib/libc.so ./x86_64-unknown-linux-gnu/sys-root/usr/lib64/libc.so Still to coe are cygwin/mingw s390, ppc 860 and ppc 970 So this means everything will be generated from the same source for almost 30 platforms. After thats done, I'll release the bins and continue in this order: freebsd netbsd opensolaris (which should work on Solaris) darwin (dmitry? thoughts? is this binary compatible?) Then the same thing as much as possible with uclibc (embeded libc). The selection of the order is what I expect to be easy to setup first. I'll try them all though. Its just a computer grinding in the corner. When completed, I can move this all to a dual opteron with silly resources. It just isnt possible to create crosscompilers in a mixed 32/64 bit environment. The configuration gets all confused. So it should be just a quick script and everything compiles. The big ones that 'just wont work' are wince and w64. These use a binary format gcc does not currently support. I see some people are working on it though. Someone with the proper tools would have to do that. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 00:25:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 00:25:18 -0700 (MST) Subject: [Rxtx] Update Message-ID: The tools are made. Almost all of them work. I couldnt get hppa, cris and s390x (64 bit) working. I can get those later by installing glibc from other sources. I still have cleanup to do but this is far as I go before release. mips, ppc and arm are compiling (plus some). Here is what is building now: for i in *-*-*;do (cd $i/.libs;echo --------- $i --------; file -b librxtxSerial-2.1-7.so);done --------- alpha-unknown-linux-gnu -------- ELF 64-bit LSB shared object, Alpha (unofficial), version 1 (SYSV), not stripped --------- arm-9tdmi-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armeb-unknown-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-iwmmxt-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-softfloat-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- arm-unknown-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- armv5b-softfloat-linux-gnu -------- ELF 32-bit MSB shared object, ARM, version 1 (ARM), not stripped --------- arm-xscale-linux-gnu -------- ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped --------- i386-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- i686-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped --------- ia64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped --------- m68k-unknown-linux-gnu -------- ELF 32-bit MSB shared object, Motorola 68020, version 1 (SYSV), not stripped --------- mipsel-unknown-linux-gnu -------- ELF 32-bit LSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- mips-unknown-linux-gnu -------- ELF 32-bit MSB shared object, MIPS, MIPS-I version 1 (SYSV), not stripped --------- powerpc-405-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-440-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-604-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped --------- powerpc-7450-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-750-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- powerpc-860-linux-gnu -------- ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped --------- s390-ibm-linux-gnu -------- ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), not stripped --------- sh3-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sh4-unknown-linux-gnu -------- ELF 32-bit LSB shared object, Hitachi SH, version 1 (SYSV), not stripped --------- sparc64-unknown-linux-gnu -------- ELF 64-bit MSB shared object, SPARC V9, version 1 (SYSV), not stripped --------- sparc-unknown-linux-gnu -------- ELF 32-bit MSB shared object, SPARC, version 1 (SYSV), not stripped --------- x86_64-unknown-linux-gnu -------- ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped I think s390 should be 31 bits. I also had to modify rxtx to get sh* compiling. But thats enough for testing. Tomorrow I just polish the scripts, package, document and release. I wont be doing more with Linux. I'll be moving to freebsd next. Its about as big and probably harder to get working with my experience but should go. Almost all of this is going into the ToyBox. People can find them if they need them. We will just package the most popular ones together in a zip file. Maybe Doug will find some cool things to do with all of this. The builds go fairly fast on the opteron system so this will just be a call to a script next release. I'll give anyone that wants a copy of the crosscompilers on a couple dvds (its 5 gigs right now) with everything ready to compile rxtx when I finish. I'm only using open source so there are no issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 12:59:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 12:59:04 -0700 (MST) Subject: [Rxtx] Updated http://www.rxtx.org/porting.html Message-ID: Feedback is welcome. I'm also putting up a wiki I hope will eventually replace these pages today. More to come. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 13:39:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 13:39:09 -0700 (MST) Subject: [Rxtx] Front Page Announcement Message-ID: Don't bother looking for links and downloads for another few hours. With rxtx 2.1-7pre17 we did extensive testing I can't talk about. The Changes that the community have contributed now make those test results rather meaningless in the big picture and they will have to be done again. This is a great thing but I just want to give some background why I thought it was best to leave pre17 as the default download for end users while we progressed through pre22. If you are a company working on the side, 2.1-7 is where you want to merge with head. 2.1-8 will be comming not far down the line but it would be to everyones advantage if we all work off 2.1-7. That also explains why this front page announcement is going to be rather large: # Sat Feb 4 2006 RXTX 2.1-7 (Final) Source and Binaries are now Available! Dont confuse this with RXTX 2.1-7pre... This is the Final release of 2.1-7. RXTX 2.0-7 will follow after Sun releases a new version that resolves incompatabilities. They have been very cooperative but things take time (think May). Mac OS X x86/universal binaries/install fixes Dmitry Markman source catch exceptions on flush() so close() works. Adam Walsh source more close() performance fixes ?vind Harboe source Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul source source %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki source System.gc() slows down close() too much. ?vind Harboe source Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp source CNI retry on EINTR CNI Ignore SIGXCPU as GCJ garbage collection uses this too. Mark Anderson CNI Patch to avoid having the SIGPWR signal interrupt select() Mark Anderson CNI debug message cleanups and fd fix Mark Anderson Dont override system properties Klaus Kierer W32 build fixes and Locking fixes Dave Acker Mac OS X auto* build fixes liblockdev support dereferencing type-punned pointer will break strict-aliasing rules. Fixed. x86_64 Linux Fixes fixes BlackBox Serial now runs switch to JNI_VERSION_1_2 -- many people are still using 1.3 JREs Thread safer nativeDrain()/flush() method. Philip Gladstone Don't look for unexpected lockfiles in expected places Philip Gladstone adding the new properties gnu.io.rxtx.SerialPorts and gnu.io.rxtx.ParallelPorts insead of overriding the system properties and uses them only as default values Klaus Kierer release locks when device is unavailable. Tico Ballagas J2SE java.util.loggin and property file to match Stephane Cachat termios stack overflow fix for Linux caused by including termbits.h Bill Holmes Support for USB frobs in Linux (reports are that this does not work exactly as expected with some kernels) Christopher R. Wren configure fix for jdk 1.5 I really should trash these 1997 looking web pages. I guess I like them because my brother Keane learned how to do html on them long ago. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 17:16:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 17:16:48 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: This is a page for people who want to have links to their projects that use rxtx (open or closed source but we tell people up front which it is). Search engines eat that stuff up and it helps your project be found more than being in a hall of fame :)
  • Remotej[Source] RemoteJ is an application for adding remote control capability to your k750 like mobile phone. (Trent says wow. I never expected rxtx on phones.)
  • There was another project here. I can't find it in my 1600 emails. If you could kindly repost or send me an email off the list I'd appreciate it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Feb 4 19:24:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 4 Feb 2006 19:24:17 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download Message-ID: rxtx-2.1-7 prepresents over two years of community cooperation bringing rxtx to new levels of stability and functionality. I'm excited to announce that we are ready to release it. Maintainers get all the fun jobs. I'm sure there will be more bugs and feature requests but this is a milestone in the project. The changes are to many to mention. Please see: http://www.rxtx.org/changes.html The first version of our binaries (we wont change 2.1-7 source but we may change the builds if problems show up is: ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip We obviously provide the source under the LGPL license. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip See http://www.rxtx.org/download.html for more information. New with this release is the ToyBox. When you figure it out rxtx works on potentially over 100 platforms. Most people want the most common desktops. But we like toys. Embeded toys, Enterprise toys, we like them all. A start at filling the ToyBox with rxtx versions for your favorite toy has begun. ftp://ftp.qbang.org/pub/rxtx/ToyBox Another new feature which is in beta form right now is Dr. Douglas Lyon's supergizmo installer. Sometimes it does super things. Sometimes you let him know there are problems. The supergizmo installer can be found here. http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp Also new with this release is A bug reporting system. It will report all changes to a mail-list shortly but for now you can look at the great graphics and smile (or laugh). http://bugzilla.qbang.org One last feature that is being added but is still being worked on is a Wiki for documentation. It turns out many users don't like to read code to know how to use rxtx. After 9 years of not believing it, we at rxtx thought maybe it was time. A wiki will be forming. The hope is users and developers alike will be able to improve the already tremendous documentation rxtx provides :) http://rxtx.qbang.org/wiki [The wiki will be born late tonight] Many thanks to the developers that have helped improve rxtx and especially the users that helped us find problems. May the relationship continue. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 03:59:48 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 05:59:48 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: Hi All, First, let me say: Trent: You are doing an AMAZING job! I was wondering if there is a way to automate the creation of all the binaries (for all the platforms) from the source code? When I do a configure and a make, it just makes the binaries for one platform. I have a feeling that the macosx build is still not automated...but my gut tells me I should be able to do that (how, I don't know)... but it does seem possible (albeit, difficult). Am I correct about that? I am thinking of making a no-lock version so that you can have an install, for linux, that does not require you to be a system admin. Yes, I know that it is unsafe, but the present locking system makes configuration overhead a bit high, IMHO. Thanks! - Doug >rxtx-2.1-7 prepresents over two years of community cooperation >bringing rxtx to new levels of stability and functionality. > >I'm excited to announce that we are ready to release it. >Maintainers get all the fun jobs. I'm sure there will be more bugs >and feature requests but this is a milestone in the project. > >The changes are to many to mention. Please see: > > http://www.rxtx.org/changes.html > >The first version of our binaries (we wont change 2.1-7 source but we may >change the builds if problems show up is: > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >We obviously provide the source under the LGPL license. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip > >See http://www.rxtx.org/download.html for more information. > >New with this release is the ToyBox. When you figure it out rxtx >works on potentially over 100 platforms. Most people want the most >common desktops. But we like toys. Embeded toys, Enterprise toys, >we like them all. A start at filling the ToyBox with rxtx versions >for your favorite toy has begun. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox > >Another new feature which is in beta form right now is Dr. Douglas >Lyon's supergizmo installer. Sometimes it does super things. >Sometimes you let him know there are problems. The supergizmo >installer can be found here. > > >http://show.docjava.com:8086/book/cgij/code/jnlp/gnu.io.SafeCommDriver.jnlp > >Also new with this release is A bug reporting system. It will >report all changes to a mail-list shortly but for now you can look >at the great graphics and smile (or laugh). > > http://bugzilla.qbang.org > >One last feature that is being added but is still being worked on is >a Wiki for documentation. It turns out many users don't like to >read code to know how to use rxtx. After 9 years of not believing >it, we at rxtx thought maybe it was time. A wiki will be forming. >The hope is users and developers alike will be able to improve the >already tremendous documentation rxtx provides :) > > http://rxtx.qbang.org/wiki > >[The wiki will be born late tonight] > >Many thanks to the developers that have helped improve rxtx and >especially the users that helped us find problems. May the >relationship continue. > >-- >Trent Jarvi >tjarvi at qbang.org >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From mtnvega at yahoo.com.br Sun Feb 5 04:36:18 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Sun, 5 Feb 2006 08:36:18 -0300 (ART) Subject: [Rxtx] Documentation Wiki Message-ID: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Hello, I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page Error 404 is what I'm receiving. So, where can I find the documentation? Thank you, Luiz --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060205/b0bf71ca/attachment-0004.html From ideiglenes1 at freemail.hu Sun Feb 5 06:54:07 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 14:54:07 +0100 Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: References: Message-ID: <1139147647.23052.1.camel@localhost> Something is wrong with remotej project link. It doesnt show up on the page. Maybe href="" is missing? On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: > This is a page for people who want to have links to their projects that > use rxtx (open or closed source but we tell people up front which it is). > > Search engines eat that stuff up and it helps your project be found more > than being in a hall of fame :) > >
  • Remotej[Source] RemoteJ is an > application for adding remote control capability to your k750 like mobile > phone. (Trent says wow. I never expected rxtx on phones.) >
  • > > There was another project here. I can't find it in my 1600 emails. If > you could kindly repost or send me an email off the list I'd appreciate > it. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sun Feb 5 07:54:42 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 5 Feb 2006 09:54:42 -0500 Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: <95AA7AB7-8940-45F3-A7ED-89D278D524AB@mac.com> creating jnilib and jar shouldn't be any more difficult then on other platform but mac os x is a very user oriented OS, mac os x users are "spoiled" :-)) you have to give them installer however I think make's install target can do the job important part is to prepare the system for rxtx and run the following script (or similar) #!/bin/sh curruser=`sudo id -p | grep 'login' | sed 's/login.//'` echo $curruser if [ ! -d /var/lock ] then sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ] then sudo niutil -mergeprop / /groups/uucp users $curruser fi also installer package could be created with packagemaker command tool cd packagemaker -build -p RXTX_Tiger.pkg -f ./Install -ds -r ./Resources -proj RXTX_Tiger.pmproj file RXTX_Tiger.pmproj could be extracted from the file RXTX_Tiger.pmproj.sitx.hqx CVS repository contains RXTX_Tiger.pmproj.sitx.hqx file On Feb 5, 2006, at 5:59 AM, Dr. Douglas Lyon wrote: > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? Dmitry Markman From lux at diesel-research.com Sun Feb 5 09:37:02 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:37:02 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: <1139157422.4553.9.camel@zd7280> On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:50:38 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:50:38 -0700 Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158238.4936.1.camel@zd7280> I guess I should say that my install instructions were for the Linux OS, specifically Fedora Core 4. The approach should be the same on any Linux machine, although the target directories may be slightly different. On Sun, 2006-02-05 at 09:37 -0700, Kim Lux wrote: > On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > > Hello, > > > > I want to start using the RXTX libraries, but I would to know how, > > since I can not access the documentation wiki page > > I just started using them yesterday. > > Below is how I installed the libraries, if that helps. > > I used snippets of code from the SimpleWrite application here to get me > going. > http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html > > Instead of "import javax.comm.*;", use "import gnu.io.*;" which is > gotten from RXTXcomm.jar, which you will need to include in your project > references. > > I am working in Eclipse. > > BTW: there is no way to open a port without going through the port list > and finding it. Maybe sometime in the future someone (me ?) will write > a method called openSerialPort that allows the user to give a port > identifier, such as "/dev/tty1" and return a port ready to use. It > wouldn't take much to write that and it would save users a lot of > code. > > Hope this helps. > > > ======================================================================= > 1) Figure out which java you are running, incase there is more than one > installed. > > $ java -version > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) > > > 2) Find all the jre directories and the one from which you are currently > running. > > kfind (jre) > > 3) cd to that directory plus /lib/i386 > > cd /usr/java/jre1.5.0_05/lib/i386 > > 4) Copy the library files (*.so) to that directory. > > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . > > 5) Check that the copy was successful > > ls librxtx* > librxtxI2C.so librxtxRaw.so librxtxSerial.so > librxtxParallel.so librxtxRS485.so > > > 6) cd to the /lib/ext directory for your java. > > cd /usr/java/jre1.5.0_05/lib/ext > > 7) Copy the Jar files there > cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . > > 8) Check that it was successful > > ls RXTX* > RXTXcomm.jar > > Rxtx is now installed on your machine ready to use. > > =================================================================== > > -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Sun Feb 5 09:58:18 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 09:58:18 -0700 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <1139158698.4936.9.camel@zd7280> I've found that the newer kernels have the serial ports owned by root. For example, $ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 ... If one tries to open such a serial port as a regulator user, one will get a permission denied error. To get around this problem, I do $su #chown krlux /dev/ttyUSB0 #exit which then lets me access the port as I need to as a regular user. I've got this problem with minicom, gtkterm and now my rxtx applications. There must be a work around other than chmod, but I don't know what it is. Can anyone explain this or how to make it work "properly", ie without having to do a chown ? -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Sun Feb 5 10:55:18 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 18:55:18 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <1139162118.23052.3.camel@localhost> If you have pam installed /etc/security/console.perms is the key to configure permission for like devices. Give enough group permissions there for the device, and after you can use it with users that are in group tty. On v, 2006-02-05 at 09:58 -0700, Kim Lux wrote: > I've found that the newer kernels have the serial ports owned by root. > For example, > > $ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 > crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 > ... > > If one tries to open such a serial port as a regulator user, one will > get a permission denied error. > > To get around this problem, I do > > $su > #chown krlux /dev/ttyUSB0 > #exit > > which then lets me access the port as I need to as a regular user. > > I've got this problem with minicom, gtkterm and now my rxtx > applications. > > There must be a work around other than chmod, but I don't know what it > is. > > Can anyone explain this or how to make it work "properly", ie without > having to do a chown ? > > From tjarvi at qbang.org Sun Feb 5 11:05:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:05:19 -0700 (MST) Subject: [Rxtx] http://www.qbang.org/projects.html In-Reply-To: <1139147647.23052.1.camel@localhost> References: <1139147647.23052.1.camel@localhost> Message-ID: Thanks Paul On Sun, 5 Feb 2006, -- wrote: > Something is wrong with remotej project link. It doesnt show up on the > page. Maybe href="" is missing? > > On szo, 2006-02-04 at 17:16 -0700, Trent Jarvi wrote: >> This is a page for people who want to have links to their projects that >> use rxtx (open or closed source but we tell people up front which it is). >> >> Search engines eat that stuff up and it helps your project be found more >> than being in a hall of fame :) >> >>
  • Remotej[Source] RemoteJ is an >> application for adding remote control capability to your k750 like mobile >> phone. (Trent says wow. I never expected rxtx on phones.) >>
  • >> >> There was another project here. I can't find it in my 1600 emails. If >> you could kindly repost or send me an email off the list I'd appreciate >> it. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 11:10:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:10:26 -0700 (MST) Subject: [Rxtx] Gentoo question Message-ID: What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla entry we fixed for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:13:55 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:13:55 -0700 (MST) Subject: [Rxtx] Documentation Wiki In-Reply-To: <20060205113618.30274.qmail@web53501.mail.yahoo.com> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> Message-ID: On Sun, 5 Feb 2006, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, since I can not access the documentation wiki page > > Error 404 is what I'm receiving. > > So, where can I find the documentation? > I fell asleep lastnight without finishing the wiki :) I dont have any great content for it but will get it up today. It should not be 404. Which link did I mess up? It should be redirecting to www.qbang.org until the wiki is up. Our marketing department thinks it's a great idea to send people to www.qbang.org to increase sales and get more advert hits with our partners :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:23:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:23:50 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > First, let me say: > Trent: You are doing an AMAZING job! > > I was wondering if there is a way to automate > the creation of all the binaries (for all the platforms) from the source > code? > When I do a configure and a make, it just makes the binaries > for one platform. > > I have a feeling that the macosx build is still not automated...but > my gut tells me I should be able to do that (how, I don't know)... > but it does seem possible (albeit, difficult). Am I correct about > that? > > I am thinking of making a no-lock version so that you can have > an install, for linux, that does not require you to be a system admin. > > Yes, I know that it is unsafe, but the present locking system makes > configuration overhead a bit high, IMHO. > Hi Doug If you do the nolockfiles option in configure *please* put big hairy warnings up. There is Java and there is Unix. Java likes to think its a platform but it is on Unix too. Not doing Lock Files in Unix is very bad and I don't approve of it. (but you can do it :) When you first asked the question about 'building from one source' I knew what you need but man its not easy. Putting this together is probably worth while though and might help many java JNI projects later. I think it is possible but it needs all the crosscompilers. I honestly don't think I'll be done for 2 months. There are open source versions of solaris and Mac OS X. The companies behind them are _great_ at ABIs. Apple is constantly fixing things in gcc and catching them. Without 'knowing' I'm sure it will work. But I'm also possibly (probably) moving to Boston during this time. How this works with rxtx is the like I did with the toybox. Here is a crude example (and am I good at crude when need be). This probably wont paste well in pine. I'll be making dvds of these tools for everyone that wants them. I didnt do w32 in this build but it works the same as will Darwin and Open Solaris when the tools are done. for i in alpha-unknown-linux-gnu arm-9tdmi-linux-gnu armeb-unknown-linux-gnu arm -iwmmxt-linux-gnu arm-softfloat-linux-gnu arm-unknown-linux-gnu armv5b-softfloat -linux arm-xscale-linux-gnu cris-unknown-linux-gnu hppa-unknown-linux-gnu i386-u nknown-linux-gnu i686-unknown-linux-gnu ia64-unknown-linux-gnu m68k-unknown-linu x-gnu mipsel-unknown-linux-gnu mips-unknown-linux-gnu powerpc-405-linux-gnu powe rpc-440-linux-gnu powerpc-604-linux-gnu powerpc64-unknown-linux-gnu powerpc-7450 -linux-gnu powerpc-750-linux-gnu powerpc-860-linux-gnu s390-unknown-linux-gnu s3 90x-unknown-linux-gnu sh3-unknown-linux-gnu sh4-unknown-linux-gnu sparc64-unknow n-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu do PATH=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/$i/$i/bin/:/opt/crosstool/gcc-3.4.4-gl ibc-2.3.5/$i/bin:/opt/jdk1.5.0_01-rxtx-2.1/bin/:/bin:/usr/bin ../configure --host=i686-unknown-linux-gnu --target=$i; if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi make done -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 11:33:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 11:33:14 -0700 (MST) Subject: [Rxtx] ewie-lockfiles Message-ID: What would people think if we added an option to configure for ewie lockfiles. http://www.urbandictionary.com/define.php?term=ewie&defid=1205859 ./configure --enable-ewie-lockfiles When done, rxtx would look at and respect lockfiles but would not create them. There are many options already in configure including liblockdev and the lockfileserver if I'm not mistaken but I see companies and people going towards no lockfiles which is the worst case of all. -- Trent Jarvi tjarvi at qbang.org From ideiglenes1 at freemail.hu Sun Feb 5 12:00:21 2006 From: ideiglenes1 at freemail.hu (--) Date: Sun, 05 Feb 2006 20:00:21 +0100 Subject: [Rxtx] Gentoo question In-Reply-To: References: Message-ID: <1139166021.23050.6.camel@localhost> Currently there is no ebuild for the new release, only a bugzilla entry. I hope they will add it to gentoo portage soon. http://packages.gentoo.org/search/?sstring=rxtx This is the search for current release. On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: > What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla > entry we fixed for now. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 12:00:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 12:00:27 -0700 (MST) Subject: [Rxtx] [Announce] rxtx-2.1-7 is Available for Download In-Reply-To: References: Message-ID: > if [ -f RXTXcomm.jar ]; then touch RXTXcomm.jar; fi Don't include that. I was looking at changes for 2.1-8 and just pasted my workspace script. It wont generate headers currently if you do that. Most of the compile time is creating the jar and we only use one jar on all platforms so I was tinkering and thinking. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Feb 5 12:10:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 05 Feb 2006 14:10:34 -0500 Subject: [Rxtx] Serial port ownership question In-Reply-To: <1139158698.4936.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: I can confirm that this is the case (only root ownership of serial ports, under fedora 4). Wow, what were they thinking?! - DL >I've found that the newer kernels have the serial ports owned by root. >For example, > >$ls -al /dev/tty* >crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >... > >If one tries to open such a serial port as a regulator user, one will >get a permission denied error. > >To get around this problem, I do > >$su >#chown krlux /dev/ttyUSB0 >#exit > >which then lets me access the port as I need to as a regular user. > >I've got this problem with minicom, gtkterm and now my rxtx >applications. > >There must be a work around other than chmod, but I don't know what it >is. > >Can anyone explain this or how to make it work "properly", ie without >having to do a chown ? > > >-- >Kim Lux, Diesel Research Inc. > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Feb 5 13:18:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 13:18:06 -0700 (MST) Subject: [Rxtx] Gentoo question In-Reply-To: <1139166021.23050.6.camel@localhost> References: <1139166021.23050.6.camel@localhost> Message-ID: Hi Paul I guess we are top posting :) Thats a very interesting link as I've built everything except hppa in the toybox and ppc mac os which I dont understand on gentoo. Maybe it means something else. the sh3/4 needs a one line fix to compile. more or less, I've shown that entire page can be green. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I dont know if 80% of them work but I suspect so. On Sun, 5 Feb 2006, -- wrote: > Currently there is no ebuild for the new release, only a bugzilla entry. > I hope they will add it to gentoo portage soon. > > http://packages.gentoo.org/search/?sstring=rxtx > > This is the search for current release. > > On v, 2006-02-05 at 11:10 -0700, Trent Jarvi wrote: >> What is the proper link for rxtx ebuilds at gentoo? I linked the bugzilla >> entry we fixed for now. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Feb 5 14:26:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 14:26:40 -0700 (MST) Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > I can confirm that this is the case (only root ownership of > serial ports, under fedora 4). > Wow, what were they thinking?! > - DL > >> I've found that the newer kernels have the serial ports owned by root. >> For example, >> >> $ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >> ... This is just not a problem jcp or such are going to solve. Its a platform spitwad fight. But do look at pam. In fact thats what Sun is doing too. Maybe Linux followed their lead.. I'm not a pam guy. I've spent 16 hours trying to understand it but your users wont :) Solution? I have no clue. Its two tangent mentalities from my perspective. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 5 21:41:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 21:41:07 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. Message-ID: My brother is in from germany. I'm not going to finish the wiki at all tonight. I'll do it tomorrow or if someone does a wiki between now and then I'll just point there. :) After that I'm taking almost 2 weeks off. I have to do a technical presentation on something other than rxtx. I doubt it will be usb now. That was discusting. I'll find something cool with community! Like rxtx :) bye. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Sun Feb 5 22:02:06 2006 From: lux at diesel-research.com (Kim Lux) Date: Sun, 05 Feb 2006 22:02:06 -0700 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: Message-ID: <1139202126.3213.4.camel@zd7280> usb ? Tell me more... I need that too. On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: > My brother is in from germany. I'm not going to finish the wiki at all > tonight. I'll do it tomorrow or if someone does a wiki between now and > then I'll just point there. :) > > After that I'm taking almost 2 weeks off. I have to do a technical > presentation on something other than rxtx. I doubt it will be usb now. > That was discusting. > > I'll find something cool with community! Like rxtx :) > > bye. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 5 22:49:28 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 5 Feb 2006 22:49:28 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: <1139202126.3213.4.camel@zd7280> References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Kim Lux wrote: > usb ? Tell me more... I need that too. usb is a very proper design. Thats all it is. > > > > On Sun, 2006-02-05 at 21:41 -0700, Trent Jarvi wrote: >> My brother is in from germany. I'm not going to finish the wiki at all >> tonight. I'll do it tomorrow or if someone does a wiki between now and >> then I'll just point there. :) >> >> After that I'm taking almost 2 weeks off. I have to do a technical >> presentation on something other than rxtx. I doubt it will be usb now. >> That was discusting. >> >> I'll find something cool with community! Like rxtx :) >> >> bye. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From tjarvi at qbang.org Mon Feb 6 00:00:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 00:00:16 -0700 (MST) Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Sun, 5 Feb 2006, Trent Jarvi wrote: > On Sun, 5 Feb 2006, Kim Lux wrote: > >> usb ? Tell me more... I need that too. > > usb is a very proper design. Thats all it is. > Maybe rxtx could help usb. But it would start with helping bring back the community that was already there. It's not something I'd love to do but maybe its the right thing to do. It would probably take 2 years to do right. But maybe thats better than what we have now. I honestly don't know what IBM is doing which could just run over everything. Just some thoughts after some fine german wine. -- Trent Jarvi tjarvi at qbang.org From gadelavega at yahoo.com.ar Mon Feb 6 02:17:05 2006 From: gadelavega at yahoo.com.ar (Gonzalo A. de la Vega) Date: Mon, 06 Feb 2006 10:17:05 +0100 Subject: [Rxtx] Serial port ownership question In-Reply-To: References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> <1139158698.4936.9.camel@zd7280> Message-ID: <43E71411.4050402@yahoo.com.ar> On my Fedora Core 4: ls -l /dev/ttyS* crw-rw---- 1 root uucp 4, 64 Feb 6 2006 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 6 2006 /dev/ttyS1 ... and: grep "ttyUSB" /etc/udev/rules.d/50-udev.rules KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660" So anyone in the "uucp" group can use serial ports. On Gentoo the group is "tty". Trent Jarvi escribi?: > > > On Sun, 5 Feb 2006, Dr. Douglas Lyon wrote: > >> I can confirm that this is the case (only root ownership of >> serial ports, under fedora 4). >> Wow, what were they thinking?! >> - DL >> >>> I've found that the newer kernels have the serial ports owned by root. >>> For example, >>> >>> $ls -al /dev/tty* >>> crw-rw-rw- 1 root root 5, 0 Feb 5 02:06 /dev/tty >>> crw-rw---- 1 root root 4, 0 Feb 5 02:06 /dev/tty0 >>> crw------- 1 root root 4, 1 Feb 5 09:07 /dev/tty1 >>> crw-rw---- 1 root tty 4, 10 Feb 5 02:06 /dev/tty10 >>> crw-rw---- 1 root tty 4, 11 Feb 5 02:06 /dev/tty11 >>> ... > > > This is just not a problem jcp or such are going to solve. Its a > platform spitwad fight. But do look at pam. In fact thats what Sun > is doing too. Maybe Linux followed their lead.. I'm not a pam guy. > I've spent 16 hours trying to understand it but your users wont :) > > Solution? I have no clue. Its two tangent mentalities from my > perspective. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From mtnvega at yahoo.com.br Mon Feb 6 05:35:43 2006 From: mtnvega at yahoo.com.br (Luiz Jr) Date: Mon, 6 Feb 2006 12:35:43 +0000 (GMT) Subject: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> Message-ID: <20060206123543.57256.qmail@web53515.mail.yahoo.com> Hello, Thank you for you answer, but so the usage of the API is pretty much like the Java Communications Api? If yes, what version of the Java Comm Api? Thank you, Luiz A. Brandao Jr Kim Lux escreveu: On Sun, 2006-02-05 at 08:36 -0300, Luiz Jr wrote: > Hello, > > I want to start using the RXTX libraries, but I would to know how, > since I can not access the documentation wiki page I just started using them yesterday. Below is how I installed the libraries, if that helps. I used snippets of code from the SimpleWrite application here to get me going. http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html Instead of "import javax.comm.*;", use "import gnu.io.*;" which is gotten from RXTXcomm.jar, which you will need to include in your project references. I am working in Eclipse. BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. Hope this helps. ======================================================================= 1) Figure out which java you are running, incase there is more than one installed. $ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 2) Find all the jre directories and the one from which you are currently running. kfind (jre) 3) cd to that directory plus /lib/i386 cd /usr/java/jre1.5.0_05/lib/i386 4) Copy the library files (*.so) to that directory. cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/bin/* . 5) Check that the copy was successful ls librxtx* librxtxI2C.so librxtxRaw.so librxtxSerial.so librxtxParallel.so librxtxRS485.so 6) cd to the /lib/ext directory for your java. cd /usr/java/jre1.5.0_05/lib/ext 7) Copy the Jar files there cp /home/krlux/Desktop/'Java Controls'/rxtx-linux/lib/ext/* . 8) Check that it was successful ls RXTX* RXTXcomm.jar Rxtx is now installed on your machine ready to use. =================================================================== -- Kim Lux, Diesel Research Inc. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx --------------------------------- Yahoo! Acesso Gr?tis - Internet r?pida e gr?tis. Instale o discador agora! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/544aa403/attachment-0004.html From lyon at docjava.com Mon Feb 6 05:49:34 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 06 Feb 2006 07:49:34 -0500 Subject: [Rxtx] wiki delay until tomorrow night. In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: Hi All, I have often thought about USB drivers being needed. For example, the ironman watch will not interface to a mac (windows only). It is USB. My dymo label writer has no Java driver (native only). Etc. Most cheap web cameras are USB (and Java drivers go through JAI, if it supports the camera at all). The JAI code shows how sun did the USB drivers. You have to be a member of the jai project to download the source code. https://jai.dev.java.net has the jai distro. And then you are not allowed to redistribute it. However, we can all learn from it (if so inclined). Basically: cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core You will need to user your own uid and pw to get in. The ant build has over 100 warnings from sun deprecations of its own code. You might say that they were hoisted on their own Picard ;) One interesting thing is that they support several platforms: linux-amd64 64-bit Linux-AMD64 linux-i586 32-bit Linux-x86 solaris-amd64 64-bit Solaris-AMD64 solaris-i586 32-bit Solaris-x86 solaris-sparc 32-bit Solaris-SPARC solaris-sparcv9 64-bit Solaris-SPARC windows-i586 32-bit Windows-x86 Thus, ant is used to provide a multi-platform native method distro. Neat. How do they do it? check this out: And: The core download does not contain any C source code (it was all pre-built). Basically, they are just copying .so and .dll files into build directories. I would love to see the C code for this...but Sun does not post it on the https://jai.dev.java.net site. I don't know why...Perhaps I missed it. - Doug >On Sun, 5 Feb 2006, Trent Jarvi wrote: > >>On Sun, 5 Feb 2006, Kim Lux wrote: >> >>>usb ? Tell me more... I need that too. >> >>usb is a very proper design. Thats all it is. >> > >Maybe rxtx could help usb. But it would start with helping bring >back the community that was already there. > >It's not something I'd love to do but maybe its the right thing to do. > >It would probably take 2 years to do right. But maybe thats better >than what we have now. > >I honestly don't know what IBM is doing which could just run over everything. > >Just some thoughts after some fine german wine. > >-- >Trent Jarvi >tjarvi at qbang.org > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tdelenik at gmail.com Mon Feb 6 05:56:32 2006 From: tdelenik at gmail.com (Thanasis Delenikas) Date: Mon, 6 Feb 2006 14:56:32 +0200 Subject: Fwd: [Rxtx] Documentation Wiki In-Reply-To: <1139157422.4553.9.camel@zd7280> References: <20060205113618.30274.qmail@web53501.mail.yahoo.com> <1139157422.4553.9.camel@zd7280> Message-ID: <310a1a930602060456t129f1dc6p5f2b908f13ab5a0b@mail.gmail.com> Hello all, Kim, this is a snippet from the code I use. The closest to directly opening a specific port without enumeration. << ... portId = CommPortIdentifier.getPortIdentifier(getPort()); serialPort = (SerialPort) portId.open("jSMSEngine", 1971); ... >> where getPort() return the string identifier of the port, i.e. "/dev/ttyS0" or "COM1" or whatever. Thanasis. ---------- Forwarded message ---------- From: Kim Lux Date: Feb 5, 2006 6:37 PM Subject: Re: [Rxtx] Documentation Wiki To: RXTX Developers and Users BTW: there is no way to open a port without going through the port list and finding it. Maybe sometime in the future someone (me ?) will write a method called openSerialPort that allows the user to give a port identifier, such as "/dev/tty1" and return a port ready to use. It wouldn't take much to write that and it would save users a lot of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/182ab5b8/attachment-0004.html From tjarvi at qbang.org Mon Feb 6 11:53:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 11:53:57 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: On Mon, 6 Feb 2006, Dr. Douglas Lyon wrote: > Hi All, > I have often thought about USB drivers being needed. > For example, the ironman watch will not interface > to a mac (windows only). It is USB. > My dymo label writer has no Java driver (native only). > Etc. > Most cheap web cameras are USB (and Java drivers go > through JAI, if it supports the camera at all). > The JAI code shows how sun did the USB drivers. > You have to be a member of the jai project to download > the source code. > https://jai.dev.java.net has the jai distro. > And then you are not allowed to redistribute it. However, > we can all learn from it (if so inclined). Basically: > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs login > cvs -d :pserver:lyon at cvs.dev.java.net:/cvs checkout jai-core > You will need to user your own uid and pw to get in. > The ant build has over 100 warnings from sun deprecations > of its own code. > > You might say that they were hoisted on their own Picard ;) > > One interesting thing is that they support several platforms: > linux-amd64 64-bit Linux-AMD64 > linux-i586 32-bit Linux-x86 > solaris-amd64 64-bit Solaris-AMD64 > solaris-i586 32-bit Solaris-x86 > solaris-sparc 32-bit Solaris-SPARC > solaris-sparcv9 64-bit Solaris-SPARC > windows-i586 32-bit Windows-x86 > Thus, ant is used to provide a multi-platform native method distro. > Neat. > How do they do it? > check this out: > > > > > > > > > > > > > And: > > > > > > > > > > The core download does not contain any C source code (it was all pre-built). > Basically, they are just copying .so and .dll files into build directories. > > I would love to see the C code for this...but Sun does not post it on the > https://jai.dev.java.net site. > > I don't know why...Perhaps I missed it. > > - Doug > > I've looked at moving rxtx to Ant builds. I think that would help IDEs a great deal. I requested a evalutation desk copy the O'Reilly Ant book for some j2ee material I was teaching. http://www.oreilly.com/catalog/anttdg/ It has a one sentence mention of JNI. So there was not luck there. I saw that there is another Ant book that does mention JNI more. I can't find it now. Ant must be able to support it with extensions. http://ant.apache.org/manual/OptionalTasks/javah.html What the auto(break :) tools do in the rxtx build is 4 things really. 1) gcc compile flags 2) ld compile flags 3) config.h 4) compile flags for customizing rxtx (lockfiles, ...) See 1 All of this information except 4 can be static once obtained. So I'm not attached to the auto tools. If I could find an example of Ant being used for JNI code, I'd be one of the first to start moving that direction. Maybe someone saw an example someplace. The other thing we have not completed discussing is the directory structure. There is interest in making rxtx more IDE friendly. I get more mail about that off the list than how to install rxtx. And I see we have Ken Thompson in da house :) He is our trusted CVS maintainer and the guy that purchased the rxtx.org domain. Old community. We will need Ken for changing the directory structure of source. I would like to open up discussion about both of these as it is more than time. The problem is I have little experience with Ant and even less with IDEs. It would be nice if we could work with Eclipse and NetBeans. http://www.netbeans.org/ (sun and some community) http://www.eclipes.org (ibm,rhat,... perhaps more community) http://maven.apache.org/what-is-maven.html (apache. It is community) borland should sortof be here too but I think thats covered in eclipse. >From what I understand so far, we should morph rxtx to support those three maybe trusting apaches lead with maven. But I use vi. I have little to no clues beyond what people have fed me. Can we agree that thats the right direction to go? -- Trent Jarvi tjarvi at qbang.org From brian at mbari.org Mon Feb 6 14:57:50 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 6 Feb 2006 13:57:50 -0800 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> Message-ID: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> > The other thing we have not completed discussing is the directory > structure. There is interest in making rxtx more IDE friendly. I > get more mail about that off the list than how to install rxtx. > > And I see we have Ken Thompson in da house :) He is our trusted > CVS maintainer and the guy that purchased the rxtx.org domain. Old > community. We will need Ken for changing the directory structure of > source. > > I would like to open up discussion about both of these as it is > more than time. The problem is I have little experience with Ant > and even less with IDEs. It would be nice if we could work with > Eclipse and NetBeans. > > http://www.netbeans.org/ (sun and some community) > http://www.eclipes.org (ibm,rhat,... perhaps more community) > http://maven.apache.org/what-is-maven.html (apache. It is community) > borland should sortof be here too but I think thats covered in > eclipse. > >> From what I understand so far, we should morph rxtx to support >> those three > maybe trusting apaches lead with maven. But I use vi. I have > little to no clues beyond what people have fed me. > Maven likes the directory structure below for Java code. (From http:// maven.apache.org/guides/getting-started/index.html) This structure works fine with ant, netbeans, and eclipse. rxtx_root_directory `-- src |-- main | `-- java | `-- gnu | `-- io `-- test `-- java `-- gnu `-- io Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060206/d9451eba/attachment-0004.html From tjarvi at qbang.org Mon Feb 6 15:11:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 6 Feb 2006 15:11:45 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: > rxtx_root_directory > `-- src > |-- main > | `-- java > | `-- gnu > | `-- io > `-- test > `-- java > `-- gnu > `-- io > >From what I understand this will just be good. For me it makes no difference. So lets do the rxtx thing. Let if fester for two weeks and if nobody objects, we will do it. I'm not doing this because I care. I'm doing this to eliminate much of my inbox. But test... man is rxtx lacking there in the community aspect. It is covered but not right. _maybe_ I can change that this year. -- Trent Jarvi tjarvi at qbang.org (cat hurding since 1997) From lux at diesel-research.com Mon Feb 6 21:38:49 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 21:38:49 -0700 Subject: [Rxtx] How can I use Lock Files with rxtx (in FC4) ? Message-ID: <1139287129.17031.3.camel@zd7280> I am now running an rxtx application on FC4. I am getting: ========================================================= check_group_uucp(): error testing lock file creation Error details: Permission denied check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ========================================================= $ ls -al /var/lock total 32 drwxrwxr-x 4 root lock 4096 Feb 6 16:04 . drwxr-xr-x 24 root root 4096 Nov 14 01:19 .. drwx------ 2 root root 4096 Apr 27 2005 lvm drwxr-xr-x 2 root root 4096 Feb 6 16:04 subsys How do I fix this for regulator users ? -- Kim Lux, Diesel Research Inc. From dmarkman at mac.com Mon Feb 6 22:24:44 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 7 Feb 2006 00:24:44 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: if I understands the issue right in order to be able to use ant for c/c++ compilation you have to install ant's cc task http://ant-contrib.sourceforge.net/cc.html it looks like it should work on mac os x (authors claim, that it's platform independent) but I never tested so all you have to do it's providing right command line for the gcc compiler On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> rxtx_root_directory >> `-- src >> |-- main >> | `-- java >> | `-- gnu >> | `-- io >> `-- test >> `-- java >> `-- gnu >> `-- io >> > > >> From what I understand this will just be good. > > For me it makes no difference. So lets do the rxtx thing. Let if > fester for two weeks and if nobody objects, we will do it. > > I'm not doing this because I care. I'm doing this to eliminate > much of my inbox. > > But test... man is rxtx lacking there in the community aspect. It > is covered but not right. _maybe_ I can change that this year. > > -- > Trent Jarvi > tjarvi at qbang.org > (cat hurding since 1997) > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From lux at diesel-research.com Mon Feb 6 23:20:15 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 06 Feb 2006 23:20:15 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? Message-ID: <1139293215.3689.4.camel@zd7280> I'm running the code below. portlist.hasMoreElements() is false. /dev has ports in it as listed below. What am I doing wrong ? ========================================================== // Step through the list of ports until we find one that matches // the one we are looking for. portList = CommPortIdentifier.getPortIdentifiers(); while(portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); // if (portID.getName().equals("/dev/ttyUSB0")) { myTA.append("Serial port ttyUSB0 has been found\n"); break; }// if portID equals... }// End of while... ========================================================== ls -al /dev/tty* crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 ... crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 -- Kim Lux, Diesel Research Inc. From david.garnier at trusted-logic.com Tue Feb 7 00:46:30 2006 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 07 Feb 2006 08:46:30 +0100 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> Message-ID: <43E85056.2090608@trusted-logic.com> Hello, I think that the make-based build process is fine as it is, apart from the location of the Java source files. It is true that putting the Java source in a directory structure that map 1-to-1 to the Java package structure is the norm and should make it easier for everyone to modify the Java source, with or without an IDE. Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the current make-based process. As Trent said, they are more pressing issues, like testing. Regards, David Dmitry Markman wrote: > if I understands the issue right > in order to be able to use ant for c/c++ compilation > you have to install ant's cc task > http://ant-contrib.sourceforge.net/cc.html > > it looks like it should work on mac os x > (authors claim, that it's platform independent) > but I never tested > > so all you have to do it's providing right command line > for the gcc compiler > > > > > On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: > >>> rxtx_root_directory >>> `-- src >>> |-- main >>> | `-- java >>> | `-- gnu >>> | `-- io >>> `-- test >>> `-- java >>> `-- gnu >>> `-- io >>> >> >> >>> From what I understand this will just be good. >> >> For me it makes no difference. So lets do the rxtx thing. Let if >> fester for two weeks and if nobody objects, we will do it. >> >> I'm not doing this because I care. I'm doing this to eliminate much >> of my inbox. >> >> But test... man is rxtx lacking there in the community aspect. It is >> covered but not right. _maybe_ I can change that this year. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> (cat hurding since 1997) From tjarvi at qbang.org Tue Feb 7 01:11:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 01:11:31 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: On Tue, 7 Feb 2006, David Garnier wrote: > Hello, > > I think that the make-based build process is fine as it is, apart from the location of the Java > source files. It is true that putting the Java source in a directory structure that map 1-to-1 to > the Java package structure is the norm and should make it easier for everyone to modify the Java > source, with or without an IDE. > > Ant is a good tool, but in the RXTX case I fail to see the advantage of using it compared to the > current make-based process. As Trent said, they are more pressing issues, like testing. > Hi David I have more experience with testing rxtx than I can talk about. But let it be known, rxtx has gone trough 100's of hours of testing. We are hobby folks interested in toys but there is more. rxtx has had some of the best guidance in the industry there. This is not an easy thing. I may be able to come back in a month from the other side of the corperate fence and help. I suspect the tests could just be made public but they are in a very unusual environment that just wont work in a wider sense. This is something I'll be trying to change. At one point it was agreed we could just make the results public so this isnt just noise.. There is interest and I think its safe to mention that much. The big problem with testing in the past is most of it is done with a loopback connection. So we *still* have major questions regarding things like flow control. rxtx talks to itself over a loopback and it works. regardless of right or wrong. This requires more thought to be done right. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Feb 7 02:46:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 02:46:34 -0700 (MST) Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: > The big problem with testing in the past is most of it is done with a > loopback connection. So we *still* have major questions regarding things > like flow control. rxtx talks to itself over a loopback and it works. > regardless of right or wrong. With serial communication there are gold standards. ckermit is probably a definitive 'standard.' Maybe its possible to do ping/pong tests with ckermit? Is it scriptable? There are known issues in rxtx. Probably the worst is some threading issues regarding some JREs with multiple JNI threads setting java variables. Man did I get schooled there. Just switch the c functions to returning variables and things go away. Sometimes they work fine, sometimes they blow up. Without understanding everything, somehow rhat got it right and debian (and especially gentoo) grabbed kernel patches causing all sort of harm. Its not hard to fix once you understand whats going on but nearly impossible to track with a debugger. So I have a good idea what 2.1-8 will have outside of the IDE modifications. rxtx 2.1-7 is a release for everyone to sync with. Its not even as stable as -pre17 as far as I know - I ran no test suites. I'll be chasing it too. We just had so many contributions that it was time. It seriously broke internal scheduals but thats a great thing :) The other thing I want to do in 2.1-8 is automagic baud rates. It turns out lots of shops are doing really funky baud rates for things like automobile test equipment. It is possible but it requires a fair amount of change in the native code. Is anyone looking at this? -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Feb 7 02:57:21 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 07 Feb 2006 04:57:21 -0500 Subject: [Rxtx] Moving rxtx to Ant builds? In-Reply-To: <43E85056.2090608@trusted-logic.com> References: <1139202126.3213.4.camel@zd7280> <5DE95335-4E8C-4F05-8293-E752B8B0E246@mbari.org> <43E85056.2090608@trusted-logic.com> Message-ID: Hi All, I agree, testing is very important. The problem I have been trying to address is related to cross-platform testing and the robust nature of the installs. Typically, I visit 3 platforms to deploy my product, windows, linux and mac. A build is performed on each platform. The idea that you can build for many platforms from one copy the source code seems attractive. This should enable synchronized deployments of identical code. The question of how to achieve this goal remains open. As Trent mentioned, this is hard. Perhaps Ant will help here (but perhaps not). Ant does seem to help with running unit tests. However, it does not help with multi-platform tests. For that you need many machines and different operating environments. Toward that end, I have created a multi-platform test that can be run from web start, located at: http://show.docjava.com:8086/book/cgij/code/jnlp/serialPort.PortTest.jnlp This is interesting because many people in the community can run the test and we can improve the test, as time permits. No, it is not a perfect solution, however, the idea does help with multi-platform tests using many machines and different operating environments. If the group has a good test for a general serial port set-ups, i would be happy to deploy it, for general evaluation using web start. And as for ANT, it is just an idea. Not all my ideas are good ones! - Doug >Hello, > >I think that the make-based build process is fine as it is, apart >from the location of the Java >source files. It is true that putting the Java source in a directory >structure that map 1-to-1 to >the Java package structure is the norm and should make it easier for >everyone to modify the Java >source, with or without an IDE. > >Ant is a good tool, but in the RXTX case I fail to see the advantage >of using it compared to the >current make-based process. As Trent said, they are more pressing >issues, like testing. > >Regards, >David > >Dmitry Markman wrote: >> if I understands the issue right >> in order to be able to use ant for c/c++ compilation >> you have to install ant's cc task >> http://ant-contrib.sourceforge.net/cc.html >> >> it looks like it should work on mac os x >> (authors claim, that it's platform independent) >> but I never tested >> >> so all you have to do it's providing right command line >> for the gcc compiler >> >> >> >> >> On Feb 6, 2006, at 5:11 PM, Trent Jarvi wrote: >> >>>> rxtx_root_directory >>>> `-- src >>>> |-- main >>>> | `-- java >>>> | `-- gnu >>>> | `-- io >>>> `-- test >>>> `-- java >>>> `-- gnu >>>> `-- io >>>> >>> >>> >>>> From what I understand this will just be good. >>> >>> For me it makes no difference. So lets do the rxtx thing. Let if >>> fester for two weeks and if nobody objects, we will do it. >>> >>> I'm not doing this because I care. I'm doing this to eliminate much >>> of my inbox. >>> >>> But test... man is rxtx lacking there in the community aspect. It is >>> covered but not right. _maybe_ I can change that this year. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> (cat hurding since 1997) > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From matt.higgins at gmail.com Tue Feb 7 08:28:34 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 10:28:34 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final Message-ID: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> The following code works fine on Linux but I never see any data when run on Windows. This is a cut and paste from the SimpleRead example. I am attempting to read data from a bar code scanner. I can fire up HyperTermianl on windows and see that the device is working properly as I see the barcodes are scanned and echoed back to the terminal. However when I run the app I don't see any data. It is however associating with the com port as the informational bits print fine? import java.io.*; import java.util.*; import gnu.io.*; public class MySimpleRead implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { boolean portFound = false; String defaultPort = "COM1"; if (args.length > 0) { defaultPort = args[0]; } portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; MySimpleRead reader = new MySimpleRead(); } } } if (!portFound) { System.out.println("port " + defaultPort + " not found."); } } public MySimpleRead() { try { serialPort = (SerialPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { inputStream = serialPort.getInputStream(); } catch (IOException e) { e.printStackTrace(); } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { e.printStackTrace(); } try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } System.out.println("Baud is " + serialPort.getBaudRate()); System.out.println("Bits is " + serialPort.getDataBits()); System.out.println("Stop is " + serialPort.getStopBits()); System.out.println("Par is " + serialPort.getParity()); serialPort.notifyOnDataAvailable(true); readThread = new Thread(this); readThread.start(); } public void run() { // Thread.sleep(20000); //} catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { System.out.println("An event occurred " + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } --------------- Result on windows ------------------------------ Stable Library ============================================================== Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found port:: COM1 Baud is 9600 Bits is 8 Stop is 1 Par is 0 ----------------- End Results ----------------------------------------- ------------------ Result on Linux ----------------------------------- Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Found port: /dev/ttyS0 Baud is 9600 Bits is 8 Stop is 1 Par is 0 An event occurred 1 043100066224 ------------------ End Results --------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/a1431630/attachment-0004.html From brian at mbari.org Tue Feb 7 09:48:37 2006 From: brian at mbari.org (Brian Schlining) Date: Tue, 7 Feb 2006 08:48:37 -0800 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> Message-ID: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Hi Matt > The following code works fine on Linux but I never see any data > when run on Windows. This is a cut and paste from the SimpleRead > example. > I am attempting to read data from a bar code scanner. I can fire > up HyperTermianl on windows and see that the device is working > properly as I see the barcodes are scanned and echoed back to the > terminal. However when I run the app I don't see any data. It is > however associating with the com port as the informational bits > print fine? You're not the only one whose had this problem, I don't know if Trent has addressed this is the latest release of RXTX but there is a workaround. Here's the recent thread from the RXTX mailing list regarding this issues: Thanasis Delenikas tdelenik at gmail.com Wed Jan 18 13:56:23 MST 2006 * Previous message: [Rxtx] Re: More close() performance fixes * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi all. (I've subscribed again from my other email account). Trent, You are right. Linux *always* works, no matter what flow control you set. Windows *works only* with hardware flow control (I haven't tested what happens with software XON/XOFF flow control). I assume (but I am not certain) that even with no flow control at all, all platforms should work. Without flow control, you have the risk of bumping into overflow or framing errors, but that's your (the end programmer, I mean) problem. >From my side, I shouldn't be working without flow control. That was a bug too... It was some code forgotten from the old times, when I used to work with phone emulation drivers which didn't support flow control. The correct way is to have some flow control enabled and that's why I suppose this is a low-severity bug for RxTx. I have no idea which platform shows the correct behaviour, since my knowledge about Linux and the inner workings of these low-level i/o operations is limited. Regards, Thanasis Delenikas. > Message: 2 > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > To: RXTX Developers and Users > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > Hi all, > > > > Trent, I have found something. > > I read your comment about flow control, so I experimented a bit. > > > > If you remember, in my sample program I've used no flow control at all ( > i.e. > > Java constant FLOWCONTROL_NONE). > > > > Now, during testing, I've switch to hardware inbound flow control (i.e. > Java > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > beautifully! > > > > I think I will switch to H/W flow control and test things for a while, > but > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > Hi Thanasis, > > I'm fairly sure you have identified a bug. I would not worry too much > about what Sun CommAPI w32 defaults are. I think they did more or less > whatever the port opened with. Just a guess. Linux tries to stomp on > ports so they are all the same. > > So this started out with Linux worked, Windows XP/.. did not as I recall. > Something is wrong in rxtx. Do I understand this right? > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > Perhaps there is something Wayne or I did not understand when we wrote > that code. I wasnt programming back in the BBS days so modems are not my > thing. I have a few questions. > > Is the above matrix confirmed by observation? > Linux just always worked? > Which one _should_ work? I'm guessing modems work with hardware flow > control. I'll have to dig around. > > The windows flow control changes a couple things with hardware flow > control. Following the w32 API documentation is confusing sometimes. > But it looks like Linux could have a bug too. Cheers Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/16d07f37/attachment-0004.html From lux at diesel-research.com Tue Feb 7 11:59:58 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 11:59:58 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139293215.3689.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> Message-ID: <1139338798.8145.4.camel@zd7280> Any ideas on this ? Any reason why portList.hasMoreElements() should be false even though there are devices in /dev ? On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: > I'm running the code below. > > portlist.hasMoreElements() is false. > > /dev has ports in it as listed below. > > What am I doing wrong ? > > > ========================================================== > // Step through the list of ports until we find one that matches > // the one we are looking for. > > portList = CommPortIdentifier.getPortIdentifiers(); > > while(portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); // > if (portID.getName().equals("/dev/ttyUSB0")) > { > myTA.append("Serial port ttyUSB0 has been found\n"); > break; > }// if portID equals... > }// End of while... > ========================================================== > > ls -al /dev/tty* > crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty > crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 > crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 > crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 > crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 > ... > crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 > crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 > crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 > > > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:20:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:20:25 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139338798.8145.4.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Any ideas on this ? Any reason why portList.hasMoreElements() should be > false even though there are devices in /dev ? > > > On Mon, 2006-02-06 at 23:20 -0700, Kim Lux wrote: >> I'm running the code below. >> >> portlist.hasMoreElements() is false. >> >> /dev has ports in it as listed below. >> >> What am I doing wrong ? >> >> >> ========================================================== >> // Step through the list of ports until we find one that matches >> // the one we are looking for. >> >> portList = CommPortIdentifier.getPortIdentifiers(); >> >> while(portList.hasMoreElements()) >> { >> portID = (CommPortIdentifier) portList.nextElement(); // >> if (portID.getName().equals("/dev/ttyUSB0")) >> { >> myTA.append("Serial port ttyUSB0 has been found\n"); >> break; >> }// if portID equals... >> }// End of while... >> ========================================================== >> >> ls -al /dev/tty* >> crw-rw-rw- 1 root root 5, 0 Feb 6 15:42 /dev/tty >> crw-rw---- 1 root root 4, 0 Feb 6 15:42 /dev/tty0 >> crw------- 1 root root 4, 1 Feb 6 22:43 /dev/tty1 >> crw-rw---- 1 root tty 4, 10 Feb 6 15:42 /dev/tty10 >> crw-rw---- 1 root tty 4, 11 Feb 6 15:42 /dev/tty11 >> ... >> crw-rw---- 1 root uucp 4, 72 Feb 6 15:42 /dev/ttyS8 >> crw-rw---- 1 root uucp 4, 73 Feb 6 15:42 /dev/ttyS9 >> crw-rw---- 1 krlux uucp 188, 0 Feb 6 15:42 /dev/ttyUSB0 >> >> >> > Hi Kim What rxtx does is try to open the port and do a timed out read. If the kernel/... do not complain it's enumarted. I suspect you could do a crude test by doing something like cat /dev/ttyS0 > /dev/null If that barfs then rxtx wont enumerate the port. hmm looking at your question again, I suspect it's a lockfile problem. This is documented in INSTALL with the source. Its easy enough to test this too.. touch /var/lock/testingrxtxlockfiles && rm -f /var/lock/testingrxtxlockfiles If you are not in the right group it will bail. Root will work regardless. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 12:37:56 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 12:37:56 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> Message-ID: <1139341076.8145.11.camel@zd7280> Exactly which ports does rxtx attempt to put into the list ? /dev/* or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? For the record, only /dev/ttyUSB0 is a valid port on the machine I am presently on. Will this be a problem ? On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: > This is documented in INSTALL with the source. > I was wondering where that file was. I will download source and dig it up. Thanks. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 12:51:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 12:51:09 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139341076.8145.11.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: On Tue, 7 Feb 2006, Kim Lux wrote: > > Exactly which ports does rxtx attempt to put into the list ? /dev/* > or /dev/tty* or /dev/tty[0-9[0-9] ? or /dev/ttyS* ? > > For the record, only /dev/ttyUSB0 is a valid port on the machine I am > presently on. Will this be a problem ? > > > On Tue, 2006-02-07 at 12:20 -0700, Trent Jarvi wrote: >> This is documented in INSTALL with the source. >> > I was wondering where that file was. I will download source and dig it > up. > > Thanks. > Hmm I'm looking at pre17 so this may have changed. (its just what I have on this machine) if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } So you may need to add "ttyUSB" to that list. RXTX used to enumerate _everything_ see if(osName.equals("Linux-all-ports") But it became less than practical. This is all in RXTXCommDriver.java hmm I just did a cvs update. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA", // for the IPAQs "ttyUSB" // for USB frobs }; CandidatePortPrefixes=Temp; } You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have to get your fingers into the code. We aim for sane defaults. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 13:06:45 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 13:06:45 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139342805.8145.22.camel@zd7280> On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA" // for the IPAQs > }; > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. Excellent. Thanks for taking the time. -- Kim Lux, Diesel Research Inc. From ideiglenes1 at freemail.hu Tue Feb 7 13:53:39 2006 From: ideiglenes1 at freemail.hu (--) Date: Tue, 07 Feb 2006 21:53:39 +0100 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139345619.22534.2.camel@localhost> Hi! I use this code to get all the extra Linux devices. :) if ("Linux".equals(System.getProperty("os.name"))) { System.setProperty("os.name","Linux-all-ports"); } driver = new RXTXCommDriver(); On k, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > On Tue, 7 Feb 2006, Kim Lux wrote: > > > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux Serial Ports > "ttySA", // for the IPAQs > "ttyUSB" // for USB frobs > }; > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you have > to get your fingers into the code. We aim for sane defaults. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From matt.higgins at gmail.com Tue Feb 7 13:45:54 2006 From: matt.higgins at gmail.com (Matt Higgins) Date: Tue, 7 Feb 2006 15:45:54 -0500 Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> Message-ID: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Sweet this is exactly what I needed. I was searching the archives through marc.theamisgroup they only have archives back to 1/3/05. Should have hit the mailman archive! Thanks a lot! On 2/7/06, Brian Schlining wrote: > > Hi Matt > > The following code works fine on Linux but I never see any data when run > on Windows. This is a cut and paste from the SimpleRead example. > I am attempting to read data from a bar code scanner. I can fire up > HyperTermianl on windows and see that the device is working properly as I > see the barcodes are scanned and echoed back to the terminal. However when I > run the app I don't see any data. It is however associating with the com > port as the informational bits print fine? > > > You're not the only one whose had this problem, I don't know if Trent has > addressed this is the latest release of RXTX but there is a workaround. > Here's the recent thread from the RXTX mailing list regarding this issues: > > Thanasis Delenikas tdelenik at gmail.com > Wed Jan 18 13:56:23 MST 2006 > > * Previous message: [Rxtx] Re: More close() performance fixes > * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all. > (I've subscribed again from my other email account). > > Trent, > > You are right. Linux *always* works, no matter what flow control you set. > Windows *works only* with hardware flow control (I haven't tested what > happens with software XON/XOFF flow control). > > I assume (but I am not certain) that even with no flow control at all, all > platforms should work. Without flow control, you have the risk of bumping > into overflow or framing errors, but that's your (the end programmer, I > mean) problem. > > >From my side, I shouldn't be working without flow control. That was a bug > too... It was some code forgotten from the old times, when I used to work > with phone emulation drivers which didn't support flow control. The > correct > way is to have some flow control enabled and that's why I suppose this is > a > low-severity bug for RxTx. > > I have no idea which platform shows the correct behaviour, since > my knowledge about Linux and the inner workings of these low-level i/o > operations is limited. > > Regards, > Thanasis Delenikas. > > > > > Message: 2 > > Date: Tue, 17 Jan 2006 12:24:39 -0700 (MST) > > From: Trent Jarvi > > Subject: Re: [Rxtx] RXTX 20/01/2005 version on Win32 Problems > > To: RXTX Developers and Users > > Message-ID: > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > On Tue, 17 Jan 2006, jSMSEngine Admin wrote: > > > > > Hi all, > > > > > > Trent, I have found something. > > > I read your comment about flow control, so I experimented a bit. > > > > > > If you remember, in my sample program I've used no flow control at all > ( > > i.e. > > > Java constant FLOWCONTROL_NONE). > > > > > > Now, during testing, I've switch to hardware inbound flow control (i.e > . > > Java > > > constant FLOWCONTROL_RTSCTS_IN) and everything seems to work > > beautifully! > > > > > > I think I will switch to H/W flow control and test things for a while, > > but > > > up to now (a few hundred test read cycles) everything runs smoothly. > > > > > > > > > Hi Thanasis, > > > > I'm fairly sure you have identified a bug. I would not worry too much > > about what Sun CommAPI w32 defaults are. I think they did more or less > > whatever the port opened with. Just a guess. Linux tries to stomp on > > ports so they are all the same. > > > > So this started out with Linux worked, Windows XP/.. did not as I > recall. > > Something is wrong in rxtx. Do I understand this right? > > > > FLOWCONTROL_RTSCTS_NONE: Linux worked, Windows did not. > > FLOWCONTROL_RTSCTS_IN: Linux worked, Windows worked. > > > > Perhaps there is something Wayne or I did not understand when we wrote > > that code. I wasnt programming back in the BBS days so modems are not > my > > thing. I have a few questions. > > > > Is the above matrix confirmed by observation? > > Linux just always worked? > > Which one _should_ work? I'm guessing modems work with hardware flow > > control. I'll have to dig around. > > > > The windows flow control changes a couple things with hardware flow > > control. Following the w32 API documentation is confusing sometimes. > > But it looks like Linux could have a bug too. > > Cheers > > Brian Schlining > Software Engineer > http://www.mbari.org > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060207/9c989144/attachment-0004.html From tjarvi at qbang.org Tue Feb 7 14:06:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 14:06:14 -0700 (MST) Subject: [Rxtx] No events from notifyOnDataAvailable on windows rxtx 2.1-7 final In-Reply-To: <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> References: <950550040602070728w2a9a5e94p789189370eee9bba@mail.gmail.com> <01F64280-2E81-4D0E-890E-E6E2DB7FD452@mbari.org> <950550040602071245n5647b15bp421ff4146746bc3a@mail.gmail.com> Message-ID: >> >> You're not the only one whose had this problem, I don't know if Trent has >> addressed this is the latest release of RXTX but there is a workaround. >> Here's the recent thread from the RXTX mailing list regarding this issues: >> I have not. I expect to have access to some test equipment next month and I'll go through all of this. I really don't know whats going on and I need a gold standard. I thought maybe linux was autodetecting the flow control. Your observations would certainly be welcome. I need to talk to Russell King and see what he is doing. Until then I'd just be toying around over a loopback as usual. This is very high on the list though. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 7 17:25:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 07 Feb 2006 17:25:05 -0700 Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> Message-ID: <1139358305.17994.2.camel@zd7280> My application now works. I installed the libraries and jar from 2.1-7 (Final). portlist.hasMoreElements is no longer false. The application finds the port for /dev/ttyUSB0. Thanks for your help, Trent (et al) Sorry I bothered you with this. Next time I will look in the source first. I didn't think it was an rxtx issue, I thought it was a Linux setup issue . On Tue, 2006-02-07 at 12:51 -0700, Trent Jarvi wrote: > Hmm I'm looking at pre17 so this may have changed. (its just what I > have > on this machine) > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA" // for the > IPAQs > }; > > CandidatePortPrefixes=Temp; > } > > > So you may need to add "ttyUSB" to that list. RXTX used to enumerate > _everything_ see if(osName.equals("Linux-all-ports") But it became > less > than practical. > > This is all in RXTXCommDriver.java > > hmm I just did a cvs update. > > if(osName.equals("Linux")) > { > String[] Temp = { > "ttyS", // linux > Serial Ports > "ttySA", // for the > IPAQs > "ttyUSB" // for USB > frobs > }; > > CandidatePortPrefixes=Temp; > } > > > You should be OK with 2.1-7 (Final). RXTX can do _much_ more but you > have > to get your fingers into the code. We aim for sane defaults. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Tue Feb 7 19:21:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 7 Feb 2006 19:21:54 -0700 (MST) Subject: [Rxtx] portlist.hasMoreElements is false ? In-Reply-To: <1139358305.17994.2.camel@zd7280> References: <1139293215.3689.4.camel@zd7280> <1139338798.8145.4.camel@zd7280> <1139341076.8145.11.camel@zd7280> <1139358305.17994.2.camel@zd7280> Message-ID: >Sorry I bothered you with this. Next time I will look in the source >first. I didn't think it was an rxtx issue, I thought it was a Linux >setup issue . Why would you be sorry? I would have done the same. I'm glad it's working :) -- Trent Jarvi tjarvi at qbang.org From tma at mail.island.net Wed Feb 8 13:39:35 2006 From: tma at mail.island.net (Tom Alldread) Date: Wed, 08 Feb 2006 12:39:35 -0800 Subject: [Rxtx] Win32/Linux Serial Port Data Dropouts In-Reply-To: <200602060702.k167255O007882@www.qbang.org> References: <200602060702.k167255O007882@www.qbang.org> Message-ID: <43EA5707.4020200@mail.island.net> Greetings Folks at RXTX: During the last couple of months I have been alternately testing with javax.comm 2 and RXTX 2.1 under Windows XP and CommApi 3 and RXTX 2.1 under Suse 10.0 Linux. In the process I have learned a little about java multi-threading under NetBeans 5 with Profiler. My java (jdk 1.5_06) application is used for data acquisition and provides a graphical display of A-D conversion data received from a 56KBaud serial port. The actual data throughput is about 10KBaud thus it is well below the speed of the port. I use hardware RTS/CTS flow control which can stall the data acquisition sample rate if necessary. This ensures the display computer has the ability to slow the data acquisition rate should it become too busy to accept the regular data flow. Both the serial port buffer and the java read buffer are set at 16KB. Usually the data transfers into the java read buffer are less than 100 bytes unless the data acquisition is recovering from a stall. The data flow normally hesitates after each 5 KB block as a continue command is needed from the display computer to start the drawing of a new graphics display line. Separate threads have been provided for the serial port event monitoring and data processing. The serial port event thread has been given the maximum priority and data processing thread the minimum priority provided by java. Thread yield statements have been placed within all data processing while/for loops as an effort to ensure quick access to CPU cycles for the serial port event thread. I have found that short data transmissions are essentially error free but occasional dropouts occur with continuous data flow especially under Windows XP. ....................................................................................................................................................................................... Linux results: I am happy to report that RXTX 2.1 appears to work very well under Linux although I did notice some errors when the screen savers were running with my dual monitors. I believe this is a local problem associated with my dual graphics which needs further attention. The recent CommApi 3 Linux release from Sun did not work at all with my program. It seemed to send commands out OK but did not receive any data. Although the serial port event triggered the ISR, the input stream appeared filled with nulls and thus did not contain any data. As my understanding is that CommApi 3 was tested with a Red Hat distribution of Linux I wonder if this problem is distro dependent? Although somewhat off topic here I wonder if anyone reading this has had similar experience? .................................................................................................................................................................................. Windows XP results: There are problems with occasional data dropouts which become more frequent as the sampling rate is increased or if the computer becomes busy with other duties. The dropouts typically consist of a half dozen byte block of lost data. It appears the lost bytes never get added to the java input stream. There has not been any indication of garbled data, overruns or framing errors which suggests the UART communications remains solid. Using javax.comm 2 I found that the setting of SerialPort 'enableReceiveThreshold' to 40 and 'enableReceiveTimeout' of 100mS reduced the dropouts error rate significantly. I found that I could not get RXTX 2.1 to function with the aforementioned threshold and timeout settings. The javax.comm 2 interface is consequently performing better for me under Windows than RXTX 2.1. I wonder if anyone here has any suggestions as to what I might try to improve RXTX 2.1? Although my settings are the same as under Suse 10.0, RXTX 2.1 performs much better for me under Linux than any of the alternatives that I have tried under Windows XP . ............................................................................................................................................................................... I would like to establish, based on the experience of others, if I have reached the normally expected performance limit of java serial port communications? Should I expect to achieve virtually error free serial port data input from a continuous stream under Windows XP java software? I am considering changing my protocol to packets with error checking if necessary but would like to know if the dropout problems I am experiencing are typical or not before I take this rather work intensive plunge. Many thanks in advance for any help! Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2006-02-07 From jlaxson at mac.com Wed Feb 8 23:56:48 2006 From: jlaxson at mac.com (John Laxson) Date: Thu, 9 Feb 2006 00:56:48 -0600 Subject: [Rxtx] PortInUseException: Unknown Application on OSX Message-ID: Hi, I've been trying to get RXTX 2.1.7 going on Mac OS X for a while here, and am running up into a wall here. I've tried with pre- compiled and the source version and get the same problem, a gnu.io.PortInUseException: Unknown Application. I have run the fixperms script included with the source distribution, and id shows me as a member of the uucp group, and permissions on /var/spool/uucp are 775 root:uucp. Running a test program (included at the bottom for clarity) lets me enumerate all the serial ports correctly, but trying to open any of them gives the PortInUseException. If it helps, when I try to open a port that's set to make an outgoing bluetooth connection, there is no delay and no connection attempt at all. Thanks, John Laxson PS: The documentation wiki on qbang.org shows 404, and has for a few days now. My test code: public static void main(String[] args) { SerialPort serialPort; try { Enumeration e = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier ident; while (e.hasMoreElements()) { ident = (CommPortIdentifier)e.nextElement(); System.out.println(ident.getName()); } ident = CommPortIdentifier.getPortIdentifier("/dev/cu.modem"); serialPort = (SerialPort) ident.open("Me", 5000); } catch (Exception e) { e.printStackTrace(); } } From rajesh.invincible at gmail.com Thu Feb 9 03:39:38 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Thu, 9 Feb 2006 16:09:38 +0530 Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <43DF21D2.7090200@ngi.it> References: <43DF21D2.7090200@ngi.it> Message-ID: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Can anybody tell me how to overcome these EXCEPTIONS I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" This i came across the following statement inmy prog. SerialP is A SerialPort object SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) 2. NullPointer Exception at Event Dispatch Now i have checked all my object references for a null reference but i found none i have put up my entire code in try catch blocks but still I AM UNABLE TO CATCH THIS EXCEPTION AND HENCE MY APPLICATION CLOSES HOW DOES THESE GO? PLEASE HELP ME IT IS URGENTTTTTTTTTTTTTTTT yours sincerely RAJESH On 1/31/06, Fabio Frumento wrote: > Hi Xavier, > > I don't know maven at all but the directory hierarchy listed buy Trent > is fine for me... > > I'll take a look to maven, it seems an interesting project > > Regards > > Fabio Frumento > > Trent Jarvi wrote: > > On Tue, 31 Jan 2006, Xavier Frisaye wrote: > > > >> Hi all, > >> > >> If you are going to rearrange the src folder, i will propose to use > >> maven 2 and follow its directory structure > >> > (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). > >> > >> Maven 2 simplify java project and give a standard way to make projects > >> (http://maven.apache.org/). > >> We are using it for internal projects and we are very satisfied. > >> > >> Is anybody interested? > >> > >> I'm not an expert in maven 2 (yet) but i'm agree to help using it if > >> you choose to make so. > >> > > > > so this would be: > > > > rxtx-devel/src/main/java/gnu.io > > rxtx-devel/src/test/java/ManIwish.java > > > > I don't use IDEs very much so I'll let others comment. But I don't see > > a problem with that. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Thu Feb 9 09:50:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 9 Feb 2006 09:50:31 -0700 (MST) Subject: [Rxtx] Re: Move .java Files in gnu.io filesystem hierarchy - Maven (2) In-Reply-To: <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: On Thu, 9 Feb 2006, Rajesh N wrote: > Can anybody tell me how to overcome these EXCEPTIONS > I AM WORKING ON SERIAL COMMN IN JAVA ON LINUX. > > 1. " NOT ALL PARAMETERS SUPPORTED BY THE KERNEL" > > This i came across the following statement inmy prog. > SerialP is A SerialPort object > SerialP.setSerialPortParams(9600(BAUDRATE),DATABITS_8,STOPBITS_1,PARITY_NONE) > Strange. The parameters you use are the same the port should open with by default. Could you paste the actual exception you are getting? I don't see that in the rxtx source. Also it would help to know the rxtx version. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Fri Feb 10 15:29:05 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 15:29:05 -0700 Subject: [Rxtx] One serial port object for both sending and receiving ? Message-ID: <1139610545.18177.4.camel@zd7280> Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and use it for both sending and receiving ? For example: ======================================================================== static SerialPort serialPort = null; static OutputStream serialOut = null; static InputStream serialIn = null; // assign it to an outputStream for use try{ serialOut = serialPort.getOutputStream(); System.out.println("Serial output stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign output stream to serial port."); }//catch //assign it to an inputStream for use try{ serialIn = serialPort.getInputStream(); System.out.println("Serial input stream has been assigned."); }//try catch(IOException e) { System.out.println("Error: Couldn't assign input stream to serial port."); }//catch ======================================================================== -- Kim Lux, Diesel Research Inc. From lux at diesel-research.com Fri Feb 10 21:23:00 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 10 Feb 2006 21:23:00 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> Message-ID: <1139631780.23882.10.camel@zd7280> I've got a problem receiving chars with my version of serialRead, written in an SWT GUI. I had a Java pro have a good look at my code and he can't see anything wrong with it. I can send chars fine. When I receive a char the cpu usage for the app goes to 100% and the code in the serial event handler doesn't get executed. The instructions on the Java Comm Serial API How-To for Linux page state that I must install javacomm. Is that true ? Everything builds without it and I can send chars on rxtx just fine, but I can't receive them. Could this be the problem ? I downloaded and installed javacomm. I was not able to add "Driver=gnuio.RXTXCommDriver to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 installed in /usr/java/jre1.5.0_05. I added comm.jar to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext to the library paths. Is this OK ? Does it matter that I am receiving on /dev/ttyUSB0 ? Thanks. -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Sat Feb 11 09:44:46 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 11 Feb 2006 17:44:46 +0100 Subject: [Rxtx] Question about Serial I/O under Win32 Message-ID: <662084330@web.de> Hello everybody, I have a strange problem with a piece of code I made for myself. No, this is not really concerning rxtx, but nevertheless I post this to the list, hoping that some of you can help me. I've written two libraries, one for linux and one for win32. The linux port works quite well, I can send / receive faxes and / or replay voice messages over the telephone line using a voice modem. But the win32 port of the library causes some trouble. If, for example, I send out a fax with a certain modem under linux, it works well. The fax is complete when it comes out of the fax machine. If I then use the same modem to send out a fax under win32, the fax coming out of the fax machine gets "stuck" halfways, but the sending modem thinks that transmission was ok and drops the connection. The answering fax machine then gives me "error while receiving." The "upper layer" java code MUST be right, because if I do the same thing under linux (using the linux library), everything is alright. Now I have to ask: Can somebody please help me out with this??!? Could it be the case that some kind of flow control or COMMTIMEOUTS setting causes this behaviour? I set flow control to RTS/CTS before sending out a fax. How can I DISABLE flow control? Or what do you think? Can something else cause this problems? Thank you all for your time and PLEASE write back soon. Regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From lux at diesel-research.com Sat Feb 11 10:06:52 2006 From: lux at diesel-research.com (Kim Lux) Date: Sat, 11 Feb 2006 10:06:52 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139631780.23882.10.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> Message-ID: <1139677612.3431.5.camel@zd7280> More on this problem. I copied and pasted simpleRead into a console based Eclipse project and I've got the same result, except that cpu usage doesn't go to 100%. I'm beginning to think there is an issue in rxtx. My imports for simpleRead are: ============================ import gnu.io.*; import java.util.*; //import javax.comm.*; import java.io.*; =========================== Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to USB adapter which has worked well with minicom and gtkterm. Thanks. On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > I've got a problem receiving chars with my version of serialRead, > written in an SWT GUI. > > I had a Java pro have a good look at my code and he can't see anything > wrong with it. > > I can send chars fine. When I receive a char the cpu usage for the app > goes to 100% and the code in the serial event handler doesn't get > executed. > > The instructions on the Java Comm Serial API How-To for Linux page state > that I must install javacomm. Is that true ? Everything builds without > it and I can send chars on rxtx just fine, but I can't receive them. > Could this be the problem ? > > I downloaded and installed javacomm. I was not able to add > "Driver=gnuio.RXTXCommDriver > to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > installed in /usr/java/jre1.5.0_05. I added comm.jar > to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > to the library paths. Is this OK ? > > Does it matter that I am receiving on /dev/ttyUSB0 ? > > Thanks. > -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Sun Feb 12 21:01:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:01:33 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1139677612.3431.5.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: I suspect what is happening is the select() is breaking out in the native code but the driver does not have support for notifying there are X bytes available. On some traditional Unix based systems, the only way you know data is available is the fd status changes and do an FIORDCHK ioctl. Or perhaps the only thing you can know is the fd status changed. It would take reading through the kernel driver code to know for sure. So on USB, depending upon the driver, the same may need to be done or the driver improved a bit if possible to support. Polling reads will also work but don't use the event driven model of CommAPI which isnt acceptable in the long run. The 100% cpu usage can then be explained because select no longer blocks until the data is read; the eventLoop spins loose. You can put a well placed sleep but rxtx only expects those are needed when it knows data is available. This may not be a super simple thing to understand and fix. I do have ideas to get you started. I'm going to be short on time the next couple weeks. I expect to put some good time in and answer some other questions I saw around the 25th. For now, I'd look at the following and go from there with the hints I've given. JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, jobject jobj ) { int fd = get_java_var( env, jobj,"fd","I" ); int result; /* char message[80]; ENTER( "RXTXPort:nativeavailable" ); On SCO OpenServer FIONREAD always fails for serial devices, so try ioctl FIORDCHK instead; will only tell us whether bytes are available, not how many, but better than nothing. This turns out to be true on Solaris also. taj. */ #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ On Sat, 11 Feb 2006, Kim Lux wrote: > > More on this problem. I copied and pasted simpleRead into a console > based Eclipse project and I've got the same result, except that cpu > usage doesn't go to 100%. I'm beginning to think there is an issue in > rxtx. > > My imports for simpleRead are: > > ============================ > import gnu.io.*; > import java.util.*; > //import javax.comm.*; > import java.io.*; > =========================== > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > USB adapter which has worked well with minicom and gtkterm. > > Thanks. > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: >> I've got a problem receiving chars with my version of serialRead, >> written in an SWT GUI. >> >> I had a Java pro have a good look at my code and he can't see anything >> wrong with it. >> >> I can send chars fine. When I receive a char the cpu usage for the app >> goes to 100% and the code in the serial event handler doesn't get >> executed. >> >> The instructions on the Java Comm Serial API How-To for Linux page state >> that I must install javacomm. Is that true ? Everything builds without >> it and I can send chars on rxtx just fine, but I can't receive them. >> Could this be the problem ? >> >> I downloaded and installed javacomm. I was not able to add >> "Driver=gnuio.RXTXCommDriver >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 >> installed in /usr/java/jre1.5.0_05. I added comm.jar >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext >> to the library paths. Is this OK ? >> >> Does it matter that I am receiving on /dev/ttyUSB0 ? >> >> Thanks. >> > From tjarvi at qbang.org Sun Feb 12 21:03:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:03:30 -0700 (MST) Subject: [Rxtx] One serial port object for both sending and receiving ? In-Reply-To: <1139610545.18177.4.camel@zd7280> References: <1139610545.18177.4.camel@zd7280> Message-ID: On Fri, 10 Feb 2006, Kim Lux wrote: > > Is it OK to use one SerialPort ojbect (ex Serial Port serialPort;) and > use it for both sending and receiving ? > > For example: > > ======================================================================== > static SerialPort serialPort = null; > static OutputStream serialOut = null; > static InputStream serialIn = null; > > > > > // assign it to an outputStream for use > try{ > serialOut = serialPort.getOutputStream(); > System.out.println("Serial output stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign output stream to serial > port."); > }//catch > > > //assign it to an inputStream for use > try{ > serialIn = serialPort.getInputStream(); > System.out.println("Serial input stream has been assigned."); > }//try > catch(IOException e) > { > System.out.println("Error: Couldn't assign input stream to serial > port."); > }//catch This should be fine. In fact trying to do it another way will probably not work as you will run into lockfile issues. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 12 21:13:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 12 Feb 2006 21:13:13 -0700 (MST) Subject: [Rxtx] Question about Serial I/O under Win32 In-Reply-To: <662084330@web.de> References: <662084330@web.de> Message-ID: On Sat, 11 Feb 2006 lunareclipse03 at web.de wrote: > Hello everybody, > > I have a strange problem with a piece of code I made for myself. No, > this is not really concerning rxtx, but nevertheless I post this to the > list, hoping that some of you can help me. I've written two libraries, > one for linux and one for win32. The linux port works quite well, I can > send / receive faxes and / or replay voice messages over the telephone > line using a voice modem. But the win32 port of the library causes some > trouble. If, for example, I send out a fax with a certain modem under > linux, it works well. The fax is complete when it comes out of the fax > machine. If I then use the same modem to send out a fax under win32, the > fax coming out of the fax machine gets "stuck" halfways, but the sending > modem thinks that transmission was ok and drops the connection. The > answering fax machine then gives me "error while receiving." The "upper > layer" java code MUST be right, because if I do the same thing under > linux (using the linux library), everything is alright. Now I have to > ask: Can somebody please help me out with this??!? Could it be the case > that some kind of flow control or COMMTIMEOUTS setting causes this > behaviour? I set flow control to RTS/CTS before sending out a fax. How > can I DISABLE flow control? Or what do you think? Can something else > cause this problems? Thank you all for your time and PLEASE write back > soon. > Hi Sven I'm not too willing to talk about flow control at the low level until I confirm some things with test equipment later. It is not clear if you are using rxtx or writing your own native code. So I'm not sure how to answer much of this :) If you are wondering how to change the flow control using rxtx from java, The BlackBox example from Sun flips this back and forth. SerialPort.java in rxtx 2.1 uses the following: SerialPort.java: public static final int FLOWCONTROL_NONE =0; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_IN =1; SerialPort.java: public static final int FLOWCONTROL_RTSCTS_OUT =2; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_IN =4; SerialPort.java: public static final int FLOWCONTROL_XONXOFF_OUT=8; So if you set flowcontrol to RTSCTS, you can set it to NONE to turn it off. If you are looking for how to do it in native code, the rxtx Source is SerialImp.c (unix/linux/mac os x/w32) and termios.c (w32 only with SerialImp.c) You can track the code: SerialImp.c:JNIEXPORT void JNICALL RXTXPort(setflowcontrol)( JNIEnv *env, jobject jobj, jint flowmode ) termios.c:int tcgetattr( int fd, struct termios *s_termios ) termios.c:int tcsetattr( int fd, int when, struct termios *s_termios ) There may be a problem in the rxtx flow control code though. Rather than guess, I want to test this with a gold standard. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Mon Feb 13 08:35:04 2006 From: lux at diesel-research.com (Kim Lux) Date: Mon, 13 Feb 2006 08:35:04 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1139844904.3260.0.camel@zd7280> Thanks, Trent. -- Kim Lux, Diesel Research Inc. From rajesh.invincible at gmail.com Tue Feb 14 05:23:42 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:53:42 +0530 Subject: [Rxtx] JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED Message-ID: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Excuse me all of you can anybody help me I am doing serial communocation between a java program on linux to a microcontroller The default baud rate in java is 9600bps 1.Now when i use a microcontroller programmed for 9600bps then it gives me half data+half junk i.e PARTIAL OUTPUT 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT MY CODE SNIPPET HAS: SerialPort s=(SerialPort)commportid1.open("asdf",2000); s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); SIMILARLY i have tried for 19200bps but it didn't work i also tried all the FLOWCONTROL modes no use THE ONLY THING I GET IS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/2aabda4d/attachment-0004.html From rajesh.invincible at gmail.com Tue Feb 14 05:28:47 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Tue, 14 Feb 2006 17:58:47 +0530 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> Message-ID: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> > *Excuse me all of you * > *can anybody help me please doooo* > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* THE ONLY THING I GET IS > * java.lang.IOException: not all parameters supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME TRENT* ** yours RAJESH > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060214/3c79a9f9/attachment-0004.html From f.frumento at ngi.it Wed Feb 15 07:53:38 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 15 Feb 2006 15:53:38 +0100 Subject: [Rxtx] Re: JAVA(LINUX)-MICROCONTROLLER COMMN.[PROBLEM]--SPEED NOT SUPPORTED In-Reply-To: <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> References: <6b2c65f0602140423h5019f5b6ib760cb633e0c3fac@mail.gmail.com> <6b2c65f0602140428p4757095dn975ac7756b36d61@mail.gmail.com> Message-ID: <43F34072.6010005@ngi.it> Hi Rajesh Which method is trowing the exception ? I had a very similar experience with a Motorola 68360 the cause was the motorola has very accurate baud rate while the commercial RS232 not... we solved as first solution setting 58300 on the motorola and 57600 on the host, connecting a scope on the port showed us the real baud rate was 58290. I don't know if this is your case, but if you can check with a scope do it. Please send more details Regards Fabio Rajesh N wrote: > > *Excuse me all of you * > *can anybody help me please doooo* > > > I am doing serial communication between a java program on > linux*(_FEDORA CORE4_)* to a microcontroller > The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it > gives me half data+half junk > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used full junk i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED* > > > THE ONLY THING I GET IS > > > *_ java.lang.IOException: not all parameters supported by the kernel_* > *__* > *_WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED_* > *_PLEASE HELP ME TRENT_* > *__* > yours > RAJESH > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 15 23:18:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 15 Feb 2006 23:18:18 -0700 (MST) Subject: [Rxtx] status Message-ID: rxtx 2.1-7 was very much so a blind releasr. I see some questions but I cant answer them yet. The pre stuff was used in industry but now we are all following head. Thats my signal that rxtx will always be community. The downloads are going like crazy and on and off the list my email has dropped significantly. Maybe we did something right. I'm looking at uclibc now. I think thats the big one for embeded users. We can expand the community easily there. And get more bugs back. I think there are still major issues. flow control, multiport cards, .. But I'm going to be gone for 2 weeks. I want to be honest there. I'm not looking at rxtx at all. I hope some will help there as I look at a house and other things. -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 07:29:02 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 15:29:02 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Message-ID: Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil From tjarvi at qbang.org Thu Feb 16 07:37:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:37:01 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Feb 16 07:55:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 07:55:51 -0700 (MST) Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: On Thu, 16 Feb 2006, Trent Jarvi wrote: > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > >> Heya! >> >> I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using >> this old version, because it's the only one, which is precompiled for >> arm-linux and the effort of compiling another version, is very high, >> because the embedded System which runs Linux has neither much power, >> nor a c-compiler installed. >> >> The detailed specifications: >> ARM-CPU >> Familiar-Linux 0.8 w/ kernel-2.6.10 >> Bluetooth (Bluezutils) >> JRE 1.3.1 >> comm.jar version 2.0 for sparc-solaris >> >> The java-program I'm developing is a daemon which waits on a given >> serial port for incoming data to receive them. It expects data of a >> given form and has to parse the first lines (header) to get to know >> which file is sent and which size it has. >> >> And there's the problem. The same program running on Windows XP with >> JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as >> expected. But on the system specified above, it does not parse. >> >> Why? >> Does RXTX 1.4 change any format of the streams or is the >> -noverify-pram buggy, which I have to use in order to get no errors >> while trying to start the app? >> >> If someone has an idea or has more questions and want to help: please >> do it, mail me. I'm stucked. >> > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and > I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ I thought I might share what I'm looking at for uclibc support. So far crosstool is great for glibc support which is 90% of the targets but uclibc is a different beast. http://buildroot.uclibc.org/ I think thats the ticket. maybe someone has comments but thats what I'll do with the next ToyBox at this point. I'm not sitting idle I'm just swamped :) -- Trent Jarvi tjarvi at qbang.org From gildedfalcon at googlemail.com Thu Feb 16 08:17:50 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Thu, 16 Feb 2006 16:17:50 +0100 Subject: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: Message-ID: Heya! Thanks for compiling. May I simply replace my libSerial.so with the provided librxtxSerial.so from ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ ? Thanks again, Phil 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > > > Heya! > > > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > > this old version, because it's the only one, which is precompiled for > > arm-linux and the effort of compiling another version, is very high, > > because the embedded System which runs Linux has neither much power, > > nor a c-compiler installed. > > > > The detailed specifications: > > ARM-CPU > > Familiar-Linux 0.8 w/ kernel-2.6.10 > > Bluetooth (Bluezutils) > > JRE 1.3.1 > > comm.jar version 2.0 for sparc-solaris > > > > The java-program I'm developing is a daemon which waits on a given > > serial port for incoming data to receive them. It expects data of a > > given form and has to parse the first lines (header) to get to know > > which file is sent and which size it has. > > > > And there's the problem. The same program running on Windows XP with > > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > > expected. But on the system specified above, it does not parse. > > > > Why? > > Does RXTX 1.4 change any format of the streams or is the > > -noverify-pram buggy, which I have to use in order to get no errors > > while trying to start the app? > > > > If someone has an idea or has more questions and want to help: please > > do it, mail me. I'm stucked. > > > > > Hi Phil > > rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it > and I doubt anyone else will. > > I've tried to provide a binary for arm. Its glibc but we will be doing > uclibc "soon" too. Soon is about a month :) I'm really interested as a > hobby guy to see arm work. Thats sortof how rxtx started. > > ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From daniel.manzke at technik-emden.de Thu Feb 16 08:46:13 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 16:46:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Hi Phil, i've a pre-compiled version for an arm-linux... we have a board with an arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I thing... could it be that the kernel doesn't matter?!... because then I really thing about it... I compiled it on a suse linux... because we have an arm-linux cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... had no time to test it at the new ones with kernel 2.6.. but u would get a problem because jre 1.3.1.... hmm lots of questions I mean :D we don't use any jre... because of the licenses... we use the open-source gnu classpath and jamvm... daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Philipp Kemmeter Gesendet: Donnerstag, 16. Februar 2006 15:29 An: rxtx at qbang.org Betreff: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux Heya! I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using this old version, because it's the only one, which is precompiled for arm-linux and the effort of compiling another version, is very high, because the embedded System which runs Linux has neither much power, nor a c-compiler installed. The detailed specifications: ARM-CPU Familiar-Linux 0.8 w/ kernel-2.6.10 Bluetooth (Bluezutils) JRE 1.3.1 comm.jar version 2.0 for sparc-solaris The java-program I'm developing is a daemon which waits on a given serial port for incoming data to receive them. It expects data of a given form and has to parse the first lines (header) to get to know which file is sent and which size it has. And there's the problem. The same program running on Windows XP with JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as expected. But on the system specified above, it does not parse. Why? Does RXTX 1.4 change any format of the streams or is the -noverify-pram buggy, which I have to use in order to get no errors while trying to start the app? If someone has an idea or has more questions and want to help: please do it, mail me. I'm stucked. Phil _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From daniel.manzke at technik-emden.de Thu Feb 16 09:28:19 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Thu, 16 Feb 2006 17:28:19 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: Message-ID: <200602161628.k1GGS5vl003338@farad.et-inf.fho-emden.de> Hi trent.... arm work :D ... so now u can be happy :D We use it for controlling the whole house with one box... :D Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Donnerstag, 16. Februar 2006 15:37 An: RXTX Developers and Users Betreff: Re: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux On Thu, 16 Feb 2006, Philipp Kemmeter wrote: > Heya! > > I'm using the RXTX 1.4 precompiled binary for arm-linux. I'm using > this old version, because it's the only one, which is precompiled for > arm-linux and the effort of compiling another version, is very high, > because the embedded System which runs Linux has neither much power, > nor a c-compiler installed. > > The detailed specifications: > ARM-CPU > Familiar-Linux 0.8 w/ kernel-2.6.10 > Bluetooth (Bluezutils) > JRE 1.3.1 > comm.jar version 2.0 for sparc-solaris > > The java-program I'm developing is a daemon which waits on a given > serial port for incoming data to receive them. It expects data of a > given form and has to parse the first lines (header) to get to know > which file is sent and which size it has. > > And there's the problem. The same program running on Windows XP with > JRE 1.4.2 and comm.jar version 2.0 for windows (without RXTX) works as > expected. But on the system specified above, it does not parse. > > Why? > Does RXTX 1.4 change any format of the streams or is the > -noverify-pram buggy, which I have to use in order to get no errors > while trying to start the app? > > If someone has an idea or has more questions and want to help: please > do it, mail me. I'm stucked. > Hi Phil rxtx 1.4 is 'out of scope.' It is that ancient. I wont be looking at it and I doubt anyone else will. I've tried to provide a binary for arm. Its glibc but we will be doing uclibc "soon" too. Soon is about a month :) I'm really interested as a hobby guy to see arm work. Thats sortof how rxtx started. ftp://ftp.qbang.org/pub/rxtx/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/ -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Feb 16 10:40:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 10:40:11 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Thu, 16 Feb 2006, daniel.manzke wrote: > Hi Phil, > > i've a pre-compiled version for an arm-linux... we have a board with an > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > thing... > > could it be that the kernel doesn't matter?!... because then I really thing > about it... I compiled it on a suse linux... because we have an arm-linux > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > had no time to test it at the new ones with kernel 2.6.. > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > :D > > we don't use any jre... because of the licenses... we use the open-source > gnu classpath and jamvm... I think the only thing that really matters is the glibc version. I've tried to push some changes into gnu's glibc that fix flow control. Its there now but I don't know which version. Rather amazing it was found in java. Its the glibc headers that are important though. The kernel was always there. RMK is a great maintainer there. It should work and nods on the 2.4 kernel.. I realize thats what many are doing. Especially dragged behind by non open source drivers but in general tool. I don't think its a problem though for getting things going. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 18:19:12 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 18:19:12 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140139152.8248.2.camel@zd7280> On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. How would one do a polling read ? I notice that serialIn (the stream for SerialPort) doesn't seem to support the available() method. > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. I'm listening... -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 19:32:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 19:32:24 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140139152.8248.2.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: >> I suspect what is happening is the select() is breaking out in the native >> code but the driver does not have support for notifying there are X bytes >> available. >> >> On some traditional Unix based systems, the only way you know data is >> available is the fd status changes and do an FIORDCHK ioctl. Or perhaps >> the only thing you can know is the fd status changed. It would take >> reading through the kernel driver code to know for sure. >> >> So on USB, depending upon the driver, the same may need to be done or the >> driver improved a bit if possible to support. Polling reads will also >> work but don't use the event driven model of CommAPI which isnt >> acceptable in the long run. > > How would one do a polling read ? > > I notice that serialIn (the stream for SerialPort) doesn't seem to > support the available() method. > >> The 100% cpu usage can then be explained because select no longer blocks >> until the data is read; the eventLoop spins loose. You can put a well >> placed sleep but rxtx only expects those are needed when it knows data is >> available. This may not be a super simple thing to understand and fix. >> I do have ideas to get you started. > > I'm listening... > > I don't think it needs to be too complicated. You can try something like this: byte[] data = new byte[20]; portList = CommPortIdentifier.getPortIdentifiers(); ... SerialPort port = (SerialPort) portID.open("myApp", 2000); InputStream in = port.getInputStream(); port.enableReceiveTimeout(200); /* 2 deciseconds */ port.enableReceiveThreshold(20); /* 20 bytes */ while(condition) { numBytes = inputStream.read(data); ... } This is polling for input. It will timeout in 2 deciseconds if there isn't data available and it should return with up to 20 bytes. The eventLoop should behave when the data is read. You can also place sleeps in the eventLoop to slow it down. SerialImp.c: ENTER( "eventLoop\n" ); if ( !initialise_event_info_struct( &eis ) ) goto end; if ( !init_threads( &eis ) ) goto end; unlock_monitor_thread( &eis ); do{ report_time_eventLoop( ); do { >>>>>>>> usleep(5000); /* 5ms sleep */ /* nothing goes between this call and select */ That should get the cpu use to near 0. Just some ideas. You mention available() isnt working. But I think you can do without it using the above as a starting point. -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 19:58:33 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 19:58:33 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> Message-ID: <1140145113.4137.1.camel@zd7280> On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: > You mention > available() isnt working. But I think you can do without it using > the > above as a starting point. Thanks for the example. re "available() not working": I am just going by what the member popup says when it autocompletes my code. It also says that it will hang with .read() if no data is actually available. So that is obviously wrong. -- Kim Lux, Diesel Research Inc. From tjarvi at qbang.org Thu Feb 16 20:26:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 16 Feb 2006 20:26:58 -0700 (MST) Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: <1140145113.4137.1.camel@zd7280> References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: On Thu, 16 Feb 2006, Kim Lux wrote: > On Thu, 2006-02-16 at 19:32 -0700, Trent Jarvi wrote: >> You mention >> available() isnt working. But I think you can do without it using >> the >> above as a starting point. > > Thanks for the example. > > re "available() not working": I am just going by what the member popup > says when it autocompletes my code. > > It also says that it will hang with .read() if no data is actually > available. So that is obviously wrong. > > > I don't know what the autocomplete popup is seeing. It should work at that level. It calls a native function which may not be working depending upon the driver. The read behavior depends upon the timeout and threshold But be warned that timeouts less than 100 become 0. The native code divides by 100 then sets the timeout with decisecond resolution. > Threshold Timeout Read Buffer Read Behaviour > State Value State Value Size > ----------------------------------------------------------------------------------- > disabled - disabled - n bytes block until any data is available > > enabled m bytes disabled - n bytes block until min(m,n) bytes are available > > disabled - enabled x ms n bytes block for x ms or until any data is available > > enabled m bytes enabled x ms n bytes block for x ms or until min(m,n) bytes are available -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Thu Feb 16 21:17:57 2006 From: lux at diesel-research.com (Kim Lux) Date: Thu, 16 Feb 2006 21:17:57 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> <1140139152.8248.2.camel@zd7280> <1140145113.4137.1.camel@zd7280> Message-ID: <1140149877.8588.1.camel@zd7280> On Thu, 2006-02-16 at 20:26 -0700, Trent Jarvi wrote: > But be warned > that timeouts less than 100 become 0. The native code divides by 100 > then > sets the timeout with decisecond resolution. That is a pretty handy little piece of info. I'll give available() a try as well. -- Kim Lux, Diesel Research Inc. From s.tomaselli at jdialer.net Fri Feb 17 05:13:23 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Fri, 17 Feb 2006 13:13:23 +0100 Subject: [Rxtx] hello Message-ID: <43F5BDE3.3000205@jdialer.net> Hi to all! I just joined this list. I've find a strange bug using rxtx on linux. When i ask to enumerate ports, if there is a lockfile on one port, that port won't be enumerated. In jdialer, it opens the port at the startup, and in the option window you can change the used port... but it doesn't display the actually used one because the lockfile. see ya -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060217/217fc629/s.tomaselli-0004.vcf From tjarvi at qbang.org Fri Feb 17 06:37:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 06:37:15 -0700 (MST) Subject: [Rxtx] hello In-Reply-To: <43F5BDE3.3000205@jdialer.net> References: <43F5BDE3.3000205@jdialer.net> Message-ID: On Fri, 17 Feb 2006, Salvo Tomaselli wrote: > Hi to all! > I just joined this list. > > I've find a strange bug using rxtx on linux. > When i ask to enumerate ports, if there is a lockfile on one port, that port > won't be enumerated. > > In jdialer, it opens the port at the startup, and in the option window you > can change the used port... but it doesn't display the actually used one > because the lockfile. > In the lockfile is the PID of the process that placed the lock there. Are you running two applications by chance? If the port is locked by another program, thats how lockfiles work. There is a desire to allow for reenumerating ports but currently there is no support for reenumeration. cat /var/lock/LCK..ttyS0 to see the PID_Number ps auwx |grep PID_Number to see the process locking the port. If you really don't like lockfile behavior you can configure rxtx with ./configure --disable-lockfiles make But usually the port is locked for a reason and if you open it with a second program, the programs will be fighting over data causing difficult to diagnose problems. "Where is my data going? I only see some of it!" Often what happens is people run the program twice by accident or have the port open with kermit/pppd/... without realizing it. In that case, rxtx is trying to save from problems. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Fri Feb 17 08:57:14 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 16:57:14 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43F5F25A.8080305@ngi.it> Hi Trent, I'm writing some javadoc for Rxtx source while reviewing the code (I had a long stop since our last e-mails), here are some conventions i'm using: 1) Reuse of the Sun Documentation as possible (hope this is not a problem) 2) renaming method's arguments to names used in the sun implementation (just to standardize variables names...) Also i've cleaned the java code a bit, just formatting issues, removed unused variables or methods and "if - else" with redundant brackets Are you interested in a patch ? if yes, can i send it through the mailing list ? Regards Fabio Frumento From tjarvi at qbang.org Fri Feb 17 12:55:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 17 Feb 2006 12:55:10 -0700 (MST) Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: <43F5F25A.8080305@ngi.it> References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: On Fri, 17 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I'm writing some javadoc for Rxtx source while reviewing the code (I had a > long stop since our last e-mails), here are some conventions i'm using: > > 1) Reuse of the Sun Documentation as possible (hope this is not a problem) > > 2) renaming method's arguments to names used in the sun implementation (just > to standardize variables names...) > > Also i've cleaned the java code a bit, just formatting issues, removed unused > variables or methods and "if - else" with redundant brackets > > Are you interested in a patch ? if yes, can i send it through the mailing > list ? > > Regards > > Fabio Frumento Hi Fabio With respect to reuse of Sun's Documentation, I don't think thats proper. That work is copyrighted by Sun Microsystems so unless they give us permission, they retain the rights. We need to respect their licensing just as we hope others respect our licensing. The work you did yourself with respect to documentation can go in. It's always better to be safe with copyrights. It probably qualifies as legal sampling or such but I'd rather not look for trouble with copy/paste derivatives. Certainly being consistant with variable names should be OK. The problem with "I cleaned up the source" patches is they tend to change many things rather than be small patches that we can all follow. So I'd be interested in them but they need to be broken into patches and posted here as individual concepts. Then everyone can accept or complain about the changes on a per patch basis. As one big patch, you will find that few can give it a good review which should be a goal for all changes. -- Trent Jarvi tjarvi at qbang.org From paul.klissner at sun.com Fri Feb 17 13:35:52 2006 From: paul.klissner at sun.com (Paul Klissner) Date: Fri, 17 Feb 2006 12:35:52 -0800 Subject: [Rxtx] A bit behind schedule Message-ID: <43F633A8.9010706@sun.com> I have not forgotten my goal of creating an update to javax.com 3.0 that doesn't incur into the RxTx namespace. I've started to architect a solution, but I got pulled off into some escalated issues. I will continue to work on it as time permits and get an evaluation copy over to you guys ASAP. Hopefully within the next month. Thanks for your patience. Paul From f.frumento at ngi.it Fri Feb 17 14:32:40 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Fri, 17 Feb 2006 22:32:40 +0100 Subject: [Rxtx] Javadoc for Rxtx In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> <43F5F25A.8080305@ngi.it> Message-ID: <43F640F8.3020900@ngi.it> Hi Trent, ok i'll write with my words all the doc i'm writing, so it can be a Rxtx property, hope this is enough. I don't want any problem too. I'll submit to you for final approval before sending to the mailing list if you wish. well... about the cleaning... they are just some markup of the source code, i'll post one patch at time for any file with javadoc and the "cleanup" but don't wait for big patches the clean up is truly "a bit" Regards Fabio Trent Jarvi wrote: > On Fri, 17 Feb 2006, Fabio Frumento wrote: > >> Hi Trent, >> >> I'm writing some javadoc for Rxtx source while reviewing the code (I >> had a long stop since our last e-mails), here are some conventions i'm >> using: >> >> 1) Reuse of the Sun Documentation as possible (hope this is not a >> problem) >> >> 2) renaming method's arguments to names used in the sun implementation >> (just to standardize variables names...) >> >> Also i've cleaned the java code a bit, just formatting issues, removed >> unused variables or methods and "if - else" with redundant brackets >> >> Are you interested in a patch ? if yes, can i send it through the >> mailing list ? >> >> Regards >> >> Fabio Frumento > > > Hi Fabio > > With respect to reuse of Sun's Documentation, I don't think thats > proper. That work is copyrighted by Sun Microsystems so unless they give > us permission, they retain the rights. We need to respect their > licensing just as we hope others respect our licensing. The work you > did yourself with respect to documentation can go in. It's always > better to be safe with copyrights. It probably qualifies as legal > sampling or such but I'd rather not look for trouble with copy/paste > derivatives. > > Certainly being consistant with variable names should be OK. > > The problem with "I cleaned up the source" patches is they tend to > change many things rather than be small patches that we can all follow. > So I'd be interested in them but they need to be broken into patches and > posted here as individual concepts. Then everyone can accept or > complain about the changes on a per patch basis. > > As one big patch, you will find that few can give it a good review which > should be a goal for all changes. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From legolas.w at gmail.com Sat Feb 18 17:19:46 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Sun, 19 Feb 2006 03:49:46 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] Message-ID: <43F7B9A2.1060809@gmail.com> Hi After some long search in web i find your library and Im very happy because i know that it is do able. It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some data on LPT port My code is : try{ gnu.io.RXTXCommDriver rxtcom = new gnu.io.RXTXCommDriver(); System.err.println("I am going to init"); rxtcom.initialize(); System.err.println("initiated"); gnu.io.ParallelPort serPort = (gnu.io.ParallelPort) rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); * System.err.println("I want to write the port");* serPort.getOutputStream().write(255); System.err.println("Writiing done"); }catch(IOException ioex) { ioex.printStackTrace(); } It does not pass the line which is bold -*System.err.println("I want to write the port");- *in a timely manner , and after one or more minutes it return the following exception : Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I am going to init initiated I want to write the port java.io.IOException: The device is not connected. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) Im using windows XP 2005 , JDK 1.5.0 Update 4 * * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060218/16368993/attachment-0004.html From dmitry.gusev at gmail.com Sun Feb 19 09:40:42 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Sun, 19 Feb 2006 19:40:42 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> Message-ID: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Gusev Date: Feb 19, 2006 7:26 PM Subject: Version mismatch Warning To: tjarvi at qbang.org Hello Trent, I've downloaded the latest version of RXTX ( ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: Stable Library ========================================= Native lib Version = RXTX-2.1-2 Java lib Version = RXTX-2.1-7 WARNING: RXTX Version mismatch Jar version = RXTX-2.1-7 native lib Version = RXTX-2.1-2 And while opening a Serial port : COM1 java.lang.NoSuchFieldError: MonitorThreadCloseLock at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) I'm running at Windows XP SP 2 (rxtxSerial.dll) Looks like you forgot to build new version of libraries? Waiting for reply, Dmitry Gusev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/d9729a41/attachment-0004.html From tjarvi at qbang.org Sun Feb 19 14:46:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 14:46:11 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> References: <37a147f40602190826r56374d0ayb90999930b7fc160@mail.gmail.com> <37a147f40602190840h5c0a9615w56a3fe4765476bd7@mail.gmail.com> Message-ID: On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org From daniel.manzke at technik-emden.de Sun Feb 19 15:51:40 2006 From: daniel.manzke at technik-emden.de (daniel.manzke) Date: Sun, 19 Feb 2006 23:51:40 +0100 Subject: AW: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: Message-ID: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Hi Trent, Dmitry... Trent I think you didn't read his email well :) ... because he said Native lib Version = RXTX-2.1-2 --> rxtxserial.dll Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) So he didn't had a old jar file... he had a old dll... Dmitry... had u rxtx installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) Bye daniel -----Urspr?ngliche Nachricht----- Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von Trent Jarvi Gesendet: Sonntag, 19. Februar 2006 22:46 An: RXTX Developers and Users Betreff: Re: [Rxtx] Fwd: Version mismatch Warning On Sun, 19 Feb 2006, Dmitry Gusev wrote: > ---------- Forwarded message ---------- > From: Dmitry Gusev > Date: Feb 19, 2006 7:26 PM > Subject: Version mismatch Warning > To: tjarvi at qbang.org > > Hello Trent, > > I've downloaded the latest version of RXTX ( > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it says: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-2 > Java lib Version = RXTX-2.1-7 > WARNING: RXTX Version mismatch > Jar version = RXTX-2.1-7 > native lib Version = RXTX-2.1-2 > > > And while opening a Serial port : COM1 > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > Looks like you forgot to build new version of libraries? > > > > Waiting for reply, > Hi Dmitry I'm sure we built a new one. I suspect there is an old jar in your classpath or jre/ext. That code is so specific, you have to have installed rxtx 2.1-2 at some point in time. It should be RXTXcomm.jar. -- Trent Jarvi tarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17.02.2006 From dmitry.gusev at gmail.com Sun Feb 19 16:10:28 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 02:10:28 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> Message-ID: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Yes, the dll is the old one. I've never had RXTX installed before. Just downloaded it today and got this error. On 2/20/06, daniel.manzke wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had u > rxtx > installed before?... so that there is some where a old dll... I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/c10b5798/attachment-0004.html From tjarvi at qbang.org Sun Feb 19 16:19:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:19:12 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F7B9A2.1060809@gmail.com> References: <43F7B9A2.1060809@gmail.com> Message-ID: On Sun, 19 Feb 2006, Legolas Woodland wrote: > > Hi > After some long search in web i find your library and Im very happy because i > know that it is do able. > > It is one day that i am trying to use RXTX 2.1.7 on windows XP to write some > data on LPT port > My code is : > > try{ > gnu.io.RXTXCommDriver rxtcom = new > gnu.io.RXTXCommDriver(); > System.err.println("I am going to init"); > rxtcom.initialize(); > System.err.println("initiated"); > gnu.io.ParallelPort serPort = > (gnu.io.ParallelPort) > rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); > * System.err.println("I > want to write the port");* > serPort.getOutputStream().write(255); > System.err.println("Writiing done"); > }catch(IOException ioex) { > ioex.printStackTrace(); > } > It does not pass the line which is bold -*System.err.println("I > want to write the port");- *in a timely manner , and after one or more > minutes it return the following exception : > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > I am going to init > initiated > I want to write the port > java.io.IOException: The device is not connected. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > > > > > Im using windows XP 2005 , > JDK 1.5.0 Update 4 > > I'm not near my books on Parallel ports and I don't look at rxtx Parallel code very often. I'm out of town for a week. It has worked though. It just isnt used very often compared to Serial support. rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not very mature or well tested. We have had w32 patches and claims it works. Not at the full commapi support level though. There are dead ends in the native code that need work. Read and Write will Read and Write. I wonder if this isnt something like trying to send out bits over lines without having a printer like device connected. Something that would be giving a carrier detect signal. The write error is probably from the w32 API saying there is nothing detectable on the port. Have you tried just hooking a dot matrix printer up and trying that? The CommAPI is not doing outb() at address X. That has be raw io. We have a skeleton for that but its not there for w32. We are using the C-API. I expect that will work printing to a printer or something that is letting the port know its connected. But if you are trying to outb() to a line to light up an LED (for instance) I expect the write() will fail without the connected device sending +5V to the line the w32 C API expects to be high. In short, I think windows thinks the device is not plugged in. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Feb 19 16:41:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 16:41:03 -0700 (MST) Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: Yes. I did misread. It is the dll thats old. I did test those bins so something is strange on his system. I'm looking at the 2.1-7 bins now. [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c RXTX-2.1-7 I'm fairly sure thats 2.1-7 and the String returned (the last line above) is correct. So its the .dll that must be from someplace else besides the rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in windows. As a comparison while looking at bins released a year ago: strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep 2.1 /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c RXTX-2.1-7pre20 (strings is available with cygwin) Perhaps rxtx-2.1-2 was installed as part of another package. It is possible something doing serial comm is using an old version of rxtx 2.1. Often times people use rxtx without realizing it. I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on my linux.org.uk account long ago. It would have been around Sept 1, 2002. On Mon, 20 Feb 2006, Dmitry Gusev wrote: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, daniel.manzke wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had u >> rxtx >> installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >>> ---------- Forwarded message ---------- >>> From: Dmitry Gusev >>> Date: Feb 19, 2006 7:26 PM >>> Subject: Version mismatch Warning >>> To: tjarvi at qbang.org >>> >>> Hello Trent, >>> >>> I've downloaded the latest version of RXTX ( >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it >> says: >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-2 >>> Java lib Version = RXTX-2.1-7 >>> WARNING: RXTX Version mismatch >>> Jar version = RXTX-2.1-7 >>> native lib Version = RXTX-2.1-2 >>> >>> >>> And while opening a Serial port : COM1 >>> >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock >>> at gnu.io.RXTXPort.eventLoop(Native Method) >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >>> >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) >>> >>> >>> >>> Looks like you forgot to build new version of libraries? >>> >>> >>> >>> Waiting for reply, >>> >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > From dmitry.gusev at gmail.com Sun Feb 19 17:03:50 2006 From: dmitry.gusev at gmail.com (Dmitry Gusev) Date: Mon, 20 Feb 2006 03:03:50 +0300 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <37a147f40602191603g3113856frb7b58104233ac8db@mail.gmail.com> I fixed it... I ignored the instructions about putting dll and the jar into /jre/bin and /jre/lib/ext in accordance since I was thought it will work if I'll put them into my project classpath. So I just put the jar in my classpath (using eclipse) and have puted the dll near it. But there is no rxtxSerial.dll on my computer and even were not any *.dll at my jdk home that contain a string RXTX so I haven't any idea where RXTX-2.1-2 come from :\ I'm confused. But the problem is solved. Thank you. On 2/20/06, Trent Jarvi wrote: > > > Yes. I did misread. It is the dll thats old. I did test those bins so > something is strange on his system. > > I'm looking at the 2.1-7 bins now. > > [taj at www it]$ jar -xf ../rxtx-2.1-7-bins.zip > [taj at www it]$ strings rxtx-2.1-7-bins/Windows/i368-mingw32/rxtxSerial.dll > |grep 2.1 > /home/bob/foo/tar/rxtx-2.1-7/build/../src/termios.c > RXTX-2.1-7 > > I'm fairly sure thats 2.1-7 and the String returned (the last line above) > is correct. So its the .dll that must be from someplace else besides the > rxtx-2.1-7-bins.zip. The dll can be anyplace on PATH to cause problems in > windows. > > As a comparison while looking at bins released a year ago: > > strings rxtx-2.1-CVS-20050120-bins/i386-pc-mingw32/rxtxSerial.dll |grep > 2.1 > /home/bob/rxtx-2.1-CVS-20050120/build/../src/termios.c > RXTX-2.1-7pre20 > > (strings is available with cygwin) > > Perhaps rxtx-2.1-2 was installed as part of another package. It is > possible something doing serial comm is using an old version of rxtx 2.1. > Often times people use rxtx without realizing it. > > I'm not even sure we ever shipped rxtx 2.1-2 bins from rxtx.org. Maybe on > my linux.org.uk account long ago. It would have been around Sept 1, > 2002. > > On Mon, 20 Feb 2006, Dmitry Gusev wrote: > > > Yes, the dll is the old one. I've never had RXTX installed before. Just > > downloaded it today and got this error. > > > > On 2/20/06, daniel.manzke wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... had u > >> rxtx > >> installed before?... so that there is some where a old dll... > > > > I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] Im Auftrag > von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >>> ---------- Forwarded message ---------- > >>> From: Dmitry Gusev > >>> Date: Feb 19, 2006 7:26 PM > >>> Subject: Version mismatch Warning > >>> To: tjarvi at qbang.org > >>> > >>> Hello Trent, > >>> > >>> I've downloaded the latest version of RXTX ( > >>> ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip) but when I run it it > >> says: > >>> > >>> Stable Library > >>> ========================================= > >>> Native lib Version = RXTX-2.1-2 > >>> Java lib Version = RXTX-2.1-7 > >>> WARNING: RXTX Version mismatch > >>> Jar version = RXTX-2.1-7 > >>> native lib Version = RXTX-2.1-2 > >>> > >>> > >>> And while opening a Serial port : COM1 > >>> > >>> java.lang.NoSuchFieldError: MonitorThreadCloseLock > >>> at gnu.io.RXTXPort.eventLoop(Native Method) > >>> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >>> > >>> I'm running at Windows XP SP 2 (rxtxSerial.dll) > >>> > >>> > >>> > >>> Looks like you forgot to build new version of libraries? > >>> > >>> > >>> > >>> Waiting for reply, > >>> > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060219/24feb74c/attachment-0004.html From legolas.w at gmail.com Sun Feb 19 18:01:32 2006 From: legolas.w at gmail.com (Legolas Woodland) Date: Mon, 20 Feb 2006 04:31:32 +0330 Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: References: <43F7B9A2.1060809@gmail.com> Message-ID: <43F914EC.9040905@gmail.com> Trent Jarvi wrote: > On Sun, 19 Feb 2006, Legolas Woodland wrote: > >> >> Hi >> After some long search in web i find your library and Im very happy >> because i know that it is do able. >> >> It is one day that i am trying to use RXTX 2.1.7 on windows XP to >> write some data on LPT port >> My code is : >> >> try{ >> gnu.io.RXTXCommDriver rxtcom = new >> gnu.io.RXTXCommDriver(); >> System.err.println("I am going to init"); >> rxtcom.initialize(); >> System.err.println("initiated"); >> gnu.io.ParallelPort serPort = >> (gnu.io.ParallelPort) >> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >> * >> System.err.println("I want to write the port");* >> serPort.getOutputStream().write(255); >> System.err.println("Writiing done"); >> }catch(IOException ioex) { >> ioex.printStackTrace(); >> } >> It does not pass the line which is bold >> -*System.err.println("I want to write the port");- *in a timely >> manner , and after one or more minutes it return the following >> exception : >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> I am going to init >> initiated >> I want to write the port >> java.io.IOException: The device is not connected. >> in writeByte >> at gnu.io.LPRPort.writeByte(Native Method) >> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >> >> >> >> >> Im using windows XP 2005 , >> JDK 1.5.0 Update 4 >> >> > > I'm not near my books on Parallel ports and I don't look at rxtx > Parallel code very often. I'm out of town for a week. It has worked > though. It just isnt used very often compared to Serial support. > > rxtx Parallel port is about where rxtx Serial comm was in 1998. It is > not very mature or well tested. We have had w32 patches and claims it > works. Not at the full commapi support level though. There are dead > ends in the native code that need work. Read and Write will Read and > Write. > > I wonder if this isnt something like trying to send out bits over > lines without having a printer like device connected. Something that > would be giving a carrier detect signal. > > The write error is probably from the w32 API saying there is nothing > detectable on the port. > > Have you tried just hooking a dot matrix printer up and trying that? > > The CommAPI is not doing outb() at address X. That has be raw io. We > have a skeleton for that but its not there for w32. We are using the > C-API. I expect that will work printing to a printer or something > that is letting the port know its connected. But if you are trying to > outb() to a line to light up an LED (for instance) I expect the > write() will fail without the connected device sending +5V to the line > the w32 C API expects to be high. > > In short, I think windows thinks the device is not plugged in. Thank you for detailed explanations. I am trying to use library to send data over a line to some hand made devices (using some micro controller...) The hardware Eng. said that , Parallel port is much faster than serial port , so he said that we need to use parallel port. So far i tried many libraries that i find in the web , your library looks to be very complete , right now i am using ParPort and parallel port viewr , userPort to accomplish my job . http://www.soft-collection.com/ but they has some limitations..... . Do you know some other library which could help me to communicate with a parallel port device from java ? Thank you From tjarvi at qbang.org Sun Feb 19 18:57:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 19 Feb 2006 18:57:58 -0700 (MST) Subject: [Rxtx] problem on using rxtx 2.1.7 , Does not works on winXP [urgent , Please] In-Reply-To: <43F914EC.9040905@gmail.com> References: <43F7B9A2.1060809@gmail.com> <43F914EC.9040905@gmail.com> Message-ID: On Mon, 20 Feb 2006, Legolas Woodland wrote: > Trent Jarvi wrote: >> On Sun, 19 Feb 2006, Legolas Woodland wrote: >> >>> >>> Hi >>> After some long search in web i find your library and Im very happy >>> because i know that it is do able. >>> >>> It is one day that i am trying to use RXTX 2.1.7 on windows XP to write >>> some data on LPT port >>> My code is : >>> >>> try{ >>> gnu.io.RXTXCommDriver rxtcom = new >>> gnu.io.RXTXCommDriver(); >>> System.err.println("I am going to init"); >>> rxtcom.initialize(); >>> System.err.println("initiated"); >>> gnu.io.ParallelPort serPort = >>> (gnu.io.ParallelPort) >>> rxtcom.getCommPort("LPT1",CommPortIdentifier.PORT_PARALLEL); >>> * System.err.println("I >>> want to write the port");* >>> serPort.getOutputStream().write(255); >>> System.err.println("Writiing done"); >>> }catch(IOException ioex) { >>> ioex.printStackTrace(); >>> } >>> It does not pass the line which is bold -*System.err.println("I >>> want to write the port");- *in a timely manner , and after one or more >>> minutes it return the following exception : >>> >>> Stable Library >>> ========================================= >>> Native lib Version = RXTX-2.1-7 >>> Java lib Version = RXTX-2.1-7 >>> I am going to init >>> initiated >>> I want to write the port >>> java.io.IOException: The device is not connected. >>> in writeByte >>> at gnu.io.LPRPort.writeByte(Native Method) >>> at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) >>> >>> >>> >>> >>> Im using windows XP 2005 , >>> JDK 1.5.0 Update 4 >>> >>> >> >> I'm not near my books on Parallel ports and I don't look at rxtx Parallel >> code very often. I'm out of town for a week. It has worked though. It >> just isnt used very often compared to Serial support. >> >> rxtx Parallel port is about where rxtx Serial comm was in 1998. It is not >> very mature or well tested. We have had w32 patches and claims it works. >> Not at the full commapi support level though. There are dead ends in the >> native code that need work. Read and Write will Read and Write. >> >> I wonder if this isnt something like trying to send out bits over lines >> without having a printer like device connected. Something that would be >> giving a carrier detect signal. >> >> The write error is probably from the w32 API saying there is nothing >> detectable on the port. >> >> Have you tried just hooking a dot matrix printer up and trying that? >> >> The CommAPI is not doing outb() at address X. That has be raw io. We have >> a skeleton for that but its not there for w32. We are using the C-API. I >> expect that will work printing to a printer or something that is letting >> the port know its connected. But if you are trying to outb() to a line to >> light up an LED (for instance) I expect the write() will fail without the >> connected device sending +5V to the line the w32 C API expects to be high. >> >> In short, I think windows thinks the device is not plugged in. > Thank you for detailed explanations. > I am trying to use library to send data over a line to some hand made devices > (using some micro controller...) > The hardware Eng. said that , Parallel port is much faster than serial port , > so he said that we need to use parallel port. > So far i tried many libraries that i find in the web , your library looks to > be very complete , > right now i am using ParPort and parallel port viewr , userPort to > accomplish my job . http://www.soft-collection.com/ > but they has some limitations..... . > Do you know some other library which could help me to communicate with a > parallel port device from java ? > > All you need for what you are trying to do is something like this. http://www.engr.uky.edu/~jel/misc/d481/info/SPP/ (see inb/outb) I don't have time to wrap it in a JNI library right now but thats what I intended RawPort.java in rxtx 2.1 to do at some point. The entire library could be 30 lines of code for your purposes and might be a fun way to try JNI coding. You could easily look at ParallelImp.c and ParallelPort.java readByte()/writeByte() as examples. Makefile.mingw32 has the hints on how to build the library. It would probably take you a day with no experience to get a working class and native library that reads and writes to a memory location. Just use the example assembly on the web page for your native code and strip it down to one class for starters. I actually suspect people looking at parallel support in rxtx are more more interested in outb/inb for connecting to 'devices' that they just want to outb/inb with. Note that java isnt going to be blazing fast doing this. It should be OK but this is not realtime by any means. You have the kernel stack/schedual and the java schedual with many threads running. The number of times people have asked could be counted on 5 fingers though. Usually they looked at some hardware example using the port as such. Maybe you want to try getting The RawPort working in rxtx. It should not be hard and has many hobby applications. I can't really help until next week thought. -- Trent Jarvi tjarvi at qbang.org From s.tomaselli at jdialer.net Mon Feb 20 01:31:26 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:31:26 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> Message-ID: <43F97E5E.2090405@jdialer.net> I've got WinXP and i installed the latest for the 1st time. It didn't give me any problem, so i guess there is nothing wrong in it. Bye! Dmitry Gusev ha scritto: > Yes, the dll is the old one. I've never had RXTX installed before. Just > downloaded it today and got this error. > > On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > > wrote: > > Hi Trent, Dmitry... > > Trent I think you didn't read his email well :) ... because he said > > Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > > So he didn't had a old jar file... he had a old dll... Dmitry... had > u rxtx > installed before?... so that there is some where a old dll... > > I think Trent u would tell him that or? :) > > Bye daniel > > -----Urspr?ngliche Nachricht----- > Von: rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] Im > Auftrag von > Trent Jarvi > Gesendet: Sonntag, 19. Februar 2006 22:46 > An: RXTX Developers and Users > Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > > On Sun, 19 Feb 2006, Dmitry Gusev wrote: > > > ---------- Forwarded message ---------- > > From: Dmitry Gusev > > > Date: Feb 19, 2006 7:26 PM > > Subject: Version mismatch Warning > > To: tjarvi at qbang.org > > > > Hello Trent, > > > > I've downloaded the latest version of RXTX ( > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > ) but when I run it it > says: > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-2 > > Java lib Version = RXTX-2.1-7 > > WARNING: RXTX Version mismatch > > Jar version = RXTX-2.1-7 > > native lib Version = RXTX-2.1-2 > > > > > > And while opening a Serial port : COM1 > > > > java.lang.NoSuchFieldError: MonitorThreadCloseLock > > at gnu.io.RXTXPort.eventLoop(Native Method) > > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > > > I'm running at Windows XP SP 2 (rxtxSerial.dll) > > > > > > > > Looks like you forgot to build new version of libraries? > > > > > > > > Waiting for reply, > > > > Hi Dmitry > > I'm sure we built a new one. I suspect there is an old jar in your > classpath or jre/ext. That code is so specific, you have to have > installed rxtx 2.1-2 at some point in time. > > It should be RXTXcomm.jar. > > -- > Trent Jarvi > tarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > 17.02.2006 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/b7befd9d/s.tomaselli-0004.vcf From s.tomaselli at jdialer.net Mon Feb 20 01:34:18 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Mon, 20 Feb 2006 09:34:18 +0100 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97E5E.2090405@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> Message-ID: <43F97F0A.4080804@jdialer.net> Sorry i forgot that we were talking about the parallel, not serial. Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. 4give my mistake. bye Salvo Tomaselli ha scritto: > I've got WinXP and i installed the latest for the 1st time. > It didn't give me any problem, so i guess there is nothing wrong in it. > > Bye! > > Dmitry Gusev ha scritto: >> Yes, the dll is the old one. I've never had RXTX installed before. >> Just downloaded it today and got this error. >> >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de >> > wrote: >> >> Hi Trent, Dmitry... >> >> Trent I think you didn't read his email well :) ... because he said >> >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) >> >> So he didn't had a old jar file... he had a old dll... Dmitry... had >> u rxtx >> installed before?... so that there is some where a old dll... >> >> I think Trent u would tell him that or? :) >> >> Bye daniel >> >> -----Urspr?ngliche Nachricht----- >> Von: rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] Im >> Auftrag von >> Trent Jarvi >> Gesendet: Sonntag, 19. Februar 2006 22:46 >> An: RXTX Developers and Users >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning >> >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: >> >> > ---------- Forwarded message ---------- >> > From: Dmitry Gusev > > >> > Date: Feb 19, 2006 7:26 PM >> > Subject: Version mismatch Warning >> > To: tjarvi at qbang.org >> > >> > Hello Trent, >> > >> > I've downloaded the latest version of RXTX ( >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip >> ) but when I run >> it it >> says: >> > >> > Stable Library >> > ========================================= >> > Native lib Version = RXTX-2.1-2 >> > Java lib Version = RXTX-2.1-7 >> > WARNING: RXTX Version mismatch >> > Jar version = RXTX-2.1-7 >> > native lib Version = RXTX-2.1-2 >> > >> > >> > And while opening a Serial port : COM1 >> > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock >> > at gnu.io.RXTXPort.eventLoop(Native Method) >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) >> > >> > >> > >> > Looks like you forgot to build new version of libraries? >> > >> > >> > >> > Waiting for reply, >> > >> >> Hi Dmitry >> >> I'm sure we built a new one. I suspect there is an old jar in your >> classpath or jre/ext. That code is so specific, you have to have >> installed rxtx 2.1-2 at some point in time. >> >> It should be RXTXcomm.jar. >> >> -- >> Trent Jarvi >> tarvi at qbang.org >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: >> 17.02.2006 >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > -- Salvo Tomaselli JDialer chief developer www.jdialer.net -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/eac8200f/s.tomaselli-0004.vcf From rajesh.invincible at gmail.com Mon Feb 20 01:53:54 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Mon, 20 Feb 2006 00:53:54 -0800 Subject: [Rxtx] Fwd: Version mismatch Warning In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Excuse me SALVO,DMITRY,TRENT My name is Rajesh and i am presently involved in my final year curriculum project in java I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* ** > I am doing serial communication between a java program on linux*(FEDORA > CORE4)* to a microcontroller The default baud rate in java is 9600bps > 1.Now when i use a microcontroller programmed for 9600bps then it gives me > *half data+half junk* > i.e PARTIAL OUTPUT > 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT > > MY CODE SNIPPET HAS THIS: > SerialPort s=(SerialPort)commportid1.open("asdf",2000); > s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > SIMILARLY i have tried for 19200bps but it didn't work > i also tried all the FLOWCONTROL modes > no use > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED BUT NOT SURE* THE ONLY THING I GET IS > * java.io.IOException: not all params supported by the kernel* ** *WHAT DO I DO I AM STRUCK AND MY PROJECT IS HALTED* *PLEASE HELP ME Mr Hester * yours RAJESH On 2/20/06, Salvo Tomaselli wrote: > > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't > run. > > 4give my mistake. > bye > > Salvo Tomaselli ha scritto: > > I've got WinXP and i installed the latest for the 1st time. > > It didn't give me any problem, so i guess there is nothing wrong in it. > > > > Bye! > > > > Dmitry Gusev ha scritto: > >> Yes, the dll is the old one. I've never had RXTX installed before. > >> Just downloaded it today and got this error. > >> > >> On 2/20/06, *daniel.manzke* < daniel.manzke at technik-emden.de > >> > wrote: > >> > >> Hi Trent, Dmitry... > >> > >> Trent I think you didn't read his email well :) ... because he said > >> > >> Native lib Version = RXTX-2.1-2 --> rxtxserial.dll > >> Java lib Version = RXTX-2.1-7 --> rxtxcomm.jar :) > >> > >> So he didn't had a old jar file... he had a old dll... Dmitry... > had > >> u rxtx > >> installed before?... so that there is some where a old dll... > >> > >> I think Trent u would tell him that or? :) > >> > >> Bye daniel > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: rxtx-bounces at qbang.org > >> [mailto:rxtx-bounces at qbang.org ] Im > >> Auftrag von > >> Trent Jarvi > >> Gesendet: Sonntag, 19. Februar 2006 22:46 > >> An: RXTX Developers and Users > >> Betreff: Re: [Rxtx] Fwd: Version mismatch Warning > >> > >> On Sun, 19 Feb 2006, Dmitry Gusev wrote: > >> > >> > ---------- Forwarded message ---------- > >> > From: Dmitry Gusev >> > > >> > Date: Feb 19, 2006 7:26 PM > >> > Subject: Version mismatch Warning > >> > To: tjarvi at qbang.org > >> > > >> > Hello Trent, > >> > > >> > I've downloaded the latest version of RXTX ( > >> > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins.zip > >> ) but when I run > >> it it > >> says: > >> > > >> > Stable Library > >> > ========================================= > >> > Native lib Version = RXTX-2.1-2 > >> > Java lib Version = RXTX-2.1-7 > >> > WARNING: RXTX Version mismatch > >> > Jar version = RXTX-2.1-7 > >> > native lib Version = RXTX-2.1-2 > >> > > >> > > >> > And while opening a Serial port : COM1 > >> > > >> > java.lang.NoSuchFieldError: MonitorThreadCloseLock > >> > at gnu.io.RXTXPort.eventLoop(Native Method) > >> > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > >> > > >> > I'm running at Windows XP SP 2 (rxtxSerial.dll) > >> > > >> > > >> > > >> > Looks like you forgot to build new version of libraries? > >> > > >> > > >> > > >> > Waiting for reply, > >> > > >> > >> Hi Dmitry > >> > >> I'm sure we built a new one. I suspect there is an old jar in your > >> classpath or jre/ext. That code is so specific, you have to have > >> installed rxtx 2.1-2 at some point in time. > >> > >> It should be RXTXcomm.jar. > >> > >> -- > >> Trent Jarvi > >> tarvi at qbang.org > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> -- > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: > >> 17.02.2006 > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Salvo Tomaselli > JDialer chief developer > > www.jdialer.net > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060220/7191d305/attachment-0004.html From tjarvi at qbang.org Mon Feb 20 05:56:06 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:56:06 -0700 (MST) Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: On Mon, 20 Feb 2006, Rajesh N wrote: > Excuse me SALVO,DMITRY,TRENT > My name is Rajesh and i am presently involved in my final year curriculum > project in java > I saw ur website http://www.seattlerobotics.org/encoder/200205/gbcam.html > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > ** > >> I am doing serial communication between a java program on linux*(FEDORA >> CORE4)* to a microcontroller > > The default baud rate in java is 9600bps >> 1.Now when i use a microcontroller programmed for 9600bps then it gives me >> *half data+half junk* >> i.e PARTIAL OUTPUT >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO OUTPUT >> >> MY CODE SNIPPET HAS THIS: >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, >> SerialPort.PARITY_NONE); >> >> SIMILARLY i have tried for 19200bps but it didn't work >> i also tried all the FLOWCONTROL modes >> no use >> > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS INSTALLED > BUT NOT SURE* > > > THE ONLY THING I GET IS >> > > * java.io.IOException: not all params supported by the kernel* > ** Hi Rajesh, *taj flips his teachers cap into rally mode. Wasn't your project halted once before like this? With senior projects you need to take time and problem solve. The problem could be anyplace. While asking questions on mail-lists, the more complete your description of the settings and observations you make the better answer you may get. You may even have your advisor proof read your post before sending it to a list. With 9600 8 N 1, everything should work in rxtx. In fact, if you open the device as a File for reading and writing the port will be configured like that. This is the easiest thing for rxtx to do on all platforms. The same can be said for no flow control. Thats the default. RXTX is used with many projects without problems at these settings as they are by far the most common for serial communication. The Linux serial drivers for standard PC ports just work at these settings. That is how the kernel is debugged over remote console in many cases. It was one of the first things to work in Linux (since 1991) and is tested by people every release. You don't need to find new Linux serial drivers. Make sure only one program is reading the port. Since you mention the problem is worse at higher baudrates, try a 300 baudrate if you can. Perhaps there is a problem at the physical layer. Try to avoid closed source multiport cards. They do not get the same level of review. But the most important thing is to stay calm and think through the problem like an engineer. Use the resources available in your laboratory to test various theories and eliminate possibilities until you understand what the problem actually is. You should even be able to see stopbits on a oscilloscope if you do things right. And don't forget I've been teaching 'final year Java' for six years ;) Sometimes when you give the answers, you destroy the learning process. You will have to think through this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Feb 20 05:58:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 20 Feb 2006 05:58:39 -0700 (MST) Subject: [Rxtx] Salvo and Parallel Ports In-Reply-To: <43F97F0A.4080804@jdialer.net> References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> Message-ID: > Sorry i forgot that we were talking about the parallel, not serial. > Well i didn't copy the parallel dll because if i copy it, rxtx doesn't run. > I did not test Parallel port support with the last rxtx release so I'm curious what you saw while trying to install parallel native support. Could you describe the problem you saw on windows? Maybe you have the error message? I didn't think we changed anything there. Thanks -- Trent Jarvi tjarvi at qbang.org From lux at diesel-research.com Tue Feb 21 11:32:22 2006 From: lux at diesel-research.com (Kim Lux) Date: Tue, 21 Feb 2006 11:32:22 -0700 Subject: [Rxtx] Problems receiving chars with rxtx. In-Reply-To: References: <43DF21D2.7090200@ngi.it> <6b2c65f0602090239v250dd9b3p8a0e31ce24ca1f92@mail.gmail.com> <1139631780.23882.10.camel@zd7280> <1139677612.3431.5.camel@zd7280> Message-ID: <1140546743.9706.2.camel@zd7280> Update: I've got a polling version of rxtx more or less working now. However, the 200 mSec minimum timeout is causing me problems because of the time it hogs. If I poll the routine every 0.5 seconds and it waits 200mSec every time I call it, I am spending 40% of the cpu time watching a serial port. I really need the callback stuff to work. On Sun, 2006-02-12 at 21:01 -0700, Trent Jarvi wrote: > I suspect what is happening is the select() is breaking out in the native > code but the driver does not have support for notifying there are X bytes > available. > > On some traditional Unix based systems, the only way you know data is > available is the fd status changes and do an FIORDCHK ioctl. Or perhaps > the only thing you can know is the fd status changed. It would take > reading through the kernel driver code to know for sure. > > So on USB, depending upon the driver, the same may need to be done or the > driver improved a bit if possible to support. Polling reads will also > work but don't use the event driven model of CommAPI which isnt > acceptable in the long run. > > The 100% cpu usage can then be explained because select no longer blocks > until the data is read; the eventLoop spins loose. You can put a well > placed sleep but rxtx only expects those are needed when it knows data is > available. This may not be a super simple thing to understand and fix. > I do have ideas to get you started. > > I'm going to be short on time the next couple weeks. I expect to put some > good time in and answer some other questions I saw around the 25th. For > now, I'd look at the following and go from there with the hints I've > given. > > JNIEXPORT jint JNICALL RXTXPort(nativeavailable)( JNIEnv *env, > jobject jobj ) > { > int fd = get_java_var( env, jobj,"fd","I" ); > int result; > /* > char message[80]; > > > ENTER( "RXTXPort:nativeavailable" ); > > On SCO OpenServer FIONREAD always fails for serial devices, > so try ioctl FIORDCHK instead; will only tell us whether > bytes are available, not how many, but better than nothing. > > This turns out to be true on Solaris also. taj. > */ > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); > #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > > > On Sat, 11 Feb 2006, Kim Lux wrote: > > > > > More on this problem. I copied and pasted simpleRead into a console > > based Eclipse project and I've got the same result, except that cpu > > usage doesn't go to 100%. I'm beginning to think there is an issue in > > rxtx. > > > > My imports for simpleRead are: > > > > ============================ > > import gnu.io.*; > > import java.util.*; > > //import javax.comm.*; > > import java.io.*; > > =========================== > > > > Any ideas ? I am trying to read from /dev/ttyUSB0 using a serial to > > USB adapter which has worked well with minicom and gtkterm. > > > > Thanks. > > > > > > > > On Fri, 2006-02-10 at 21:23 -0700, Kim Lux wrote: > >> I've got a problem receiving chars with my version of serialRead, > >> written in an SWT GUI. > >> > >> I had a Java pro have a good look at my code and he can't see anything > >> wrong with it. > >> > >> I can send chars fine. When I receive a char the cpu usage for the app > >> goes to 100% and the code in the serial event handler doesn't get > >> executed. > >> > >> The instructions on the Java Comm Serial API How-To for Linux page state > >> that I must install javacomm. Is that true ? Everything builds without > >> it and I can send chars on rxtx just fine, but I can't receive them. > >> Could this be the problem ? > >> > >> I downloaded and installed javacomm. I was not able to add > >> "Driver=gnuio.RXTXCommDriver > >> to /usr/java/j2sdk.../jre/lib/javax.comm.properties because I do not > >> have the j2sdk installed. I am using Eclipse. I have jre1.5.0_05 > >> installed in /usr/java/jre1.5.0_05. I added comm.jar > >> to /usr/java/jre1.5.0_05/lib/ext and added /usr/java/jre1.5.0_05/lib/ext > >> to the library paths. Is this OK ? > >> > >> Does it matter that I am receiving on /dev/ttyUSB0 ? > >> > >> Thanks. > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From lunareclipse03 at web.de Tue Feb 21 17:26:21 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Wed, 22 Feb 2006 01:26:21 +0100 Subject: [Rxtx] Problem solved Message-ID: <675937713@web.de> Hi everybody, I posted some days ago, asking for help. But I got the problem solved that I had, it was just my fault. I didn't set the flowcontrol mechanism to the appropriate values. Now everything works, but now I have another problem. But that is not intended for this list because it would be too off-topic (non rxtx). Thanks again for everybody's help. Best regards, --Sven Ahlemann ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From s.tomaselli at jdialer.net Wed Feb 22 02:17:52 2006 From: s.tomaselli at jdialer.net (Salvo Tomaselli) Date: Wed, 22 Feb 2006 10:17:52 +0100 Subject: [Rxtx] hello In-Reply-To: References: <43F5BDE3.3000205@jdialer.net> Message-ID: <43FC2C40.60500@jdialer.net> Hi The port is opened by the same application. I open the port and setup the modem when the applications starts. In the option window i list the ports so the user can select where the modem is. But if the actually used port isn't listed, he is forced to change the port, and it isn't correct. I believe that a list of ports should list the ports (as it does in windows). See ya > In the lockfile is the PID of the process that placed the lock there. > Are you running two applications by chance? If the port is locked by > another program, thats how lockfiles work. There is a desire to allow > for reenumerating ports but currently there is no support for > reenumeration. > > cat /var/lock/LCK..ttyS0 to see the PID_Number > ps auwx |grep PID_Number to see the process locking the port. > > If you really don't like lockfile behavior you can configure rxtx with > > ./configure --disable-lockfiles > make > > But usually the port is locked for a reason and if you open it with a > second program, the programs will be fighting over data causing > difficult to diagnose problems. "Where is my data going? I only see > some of it!" > > Often what happens is people run the program twice by accident or have > the port open with kermit/pppd/... without realizing it. In that case, > rxtx is trying to save from problems. > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: s.tomaselli.vcf Type: text/x-vcard Size: 148 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/ee696982/s.tomaselli-0004.vcf From rajesh.invincible at gmail.com Wed Feb 22 05:09:00 2006 From: rajesh.invincible at gmail.com (Rajesh N) Date: Wed, 22 Feb 2006 17:39:00 +0530 Subject: [Rxtx] Rajesh Trying 9600 8,N,1 In-Reply-To: References: <200602192251.k1JMpd2V000533@farad.et-inf.fho-emden.de> <37a147f40602191510o130398b6u6163167406a7f625@mail.gmail.com> <43F97E5E.2090405@jdialer.net> <43F97F0A.4080804@jdialer.net> <6b2c65f0602200053n332eeb21t2e34521ffaf86af7@mail.gmail.com> Message-ID: <6b2c65f0602220409u48bbbaabua202ca9c9fcb8895@mail.gmail.com> On 2/20/06, Trent Jarvi wrote: > > On Mon, 20 Feb 2006, Rajesh N wrote: > > > Excuse me SALVO,DMITRY,TRENT > > My name is Rajesh and i am presently involved in my final year > curriculum > > project in java > > I saw ur website > http://www.seattlerobotics.org/encoder/200205/gbcam.html > > and hence *HOPE THAT U COULD HELP ME IN THIS REGARD(SERIAL COMMN).* > > ** > > > >> I am doing serial communication between a java program on linux*(FEDORA > >> CORE4)* to a microcontroller > > > > The default baud rate in java is 9600bps > >> 1.Now when i use a microcontroller programmed for 9600bps then it gives > me > >> *half data+half junk* > >> i.e PARTIAL OUTPUT > >> 2.when a 19200bps 20Mhz microcontroller was used *full junk* i.e NO > OUTPUT > >> > >> MY CODE SNIPPET HAS THIS: > >> SerialPort s=(SerialPort)commportid1.open("asdf",2000); > >> s.setFlowControlMode(SerialPort.FLOWCONTROL_NONE) > >> s.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > >> SerialPort.PARITY_NONE); > >> > >> SIMILARLY i have tried for 19200bps but it didn't work > >> i also tried all the FLOWCONTROL modes > >> no use > >> > > > > ALSO I CHECKED FEDORA CORE4 UPDATE CD FOR ANY *SERIAL DRIVERS* > > BUT I *DON'T KNOW* WHICH OF THE OPTIONS HAS THE SERIAL DRIVER > > *I HOPE* SINCE PART OF THE DATA IS COMING MY *SERIAL DRIVER IS > INSTALLED > > BUT NOT SURE* > > > > > > THE ONLY THING I GET IS > >> > > > > * java.io.IOException: not all params supported by the kernel* > > ** > > Hi Rajesh, > > *taj flips his teachers cap into rally mode. > > Wasn't your project halted once before like this? With senior projects > you need to take time and problem solve. The problem could be anyplace. > While asking questions on mail-lists, the more complete your description > of the settings and observations you make the better answer you may get. > You may even have your advisor proof read your post before sending it to a > > list. > > With 9600 8 N 1, everything should work in rxtx. In fact, if you open the > device as a File for reading and writing the port will be configured like > that. This is the easiest thing for rxtx to do on all platforms. The > same can be said for no flow control. Thats the default. RXTX is used > with many projects without problems at these settings as they are by far > the most common for serial communication. > > The Linux serial drivers for standard PC ports just work at these > settings. That is how the kernel is debugged over remote console in many > cases. It was one of the first things to work in Linux (since 1991) and > is tested by people every release. You *don't need to find new Linux > serial drivers. > * > Make sure only one program is reading the port. Since you mention the > problem is worse at *higher baudrates*, try a 300 baudrate if you can. > Perhaps there is a problem at the physical layer. Try to avoid closed > source multiport cards. They do not get the same level of review. > > But the most important thing is to stay calm and think through the problem > like an engineer. Use the resources available in your laboratory to test > various theories and eliminate possibilities until you understand what the > problem actually is. You should even be able to see stopbits on a > oscilloscope if you do things right. > > And don't forget I've been teaching 'final year Java' for six years ;) > Sometimes when you give the answers, you destroy the learning process. > You will have to think through this. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > HI TRENT As ur advice i tried the engineering way but still *failed* Let me tell u trent my project duration completes by this weekend TILL NOW I WAS GOING THAT WAY AND THAT IS WHY I THOUGHT I'LL DO IT ALL ALONE(myself) BUT I *CAN'T. I AM A FAILED MAN* THIS TIME I AM SENDING U MY CODE TOO PLZZ GO THRU IT AND HELP ME OUT I have not tried for different baud rates but i suppose my logic of receiving the data is wrong Since i am missing part of the data that means the O.S buffer which stores the data must have overflown before i processed it so it is not available to me THE PIC MICROCONTROLLER 18F452 20MhZ is programmed to send 40 bytes[hexa code] (255*255) times WHEN I EXECUTE THE PROGRAM i get 1-5 sets correctly then some 4-5 sets are gone and again some are visible and so on... So that means the speed at which the data is coming maybe my program is not able to receive and therefore lot of data is missing do u have any idea od the os buffer for eg byte r=inStream.read().Here i am operating on 1 char at a time then where is all that data stored and how can i regulate it. JUST TAKE A LOOK AT THE PROGRAM import javax.comm.*; import java.io.*; public class SerialPortImpl1 { private static SerialPort serialPort=null; private static CommPortIdentifier commportid1; private static InputStream inStream; // serial input stream private static OutputStream outStream; // serial output stream static Enumeration portlist; static byte str[] ={65,99,100,101}; public static Quec q1;//A Queue i have made is used here public void initializeSerialPort() { eg=new byte[5100]; try { boolean portfound=false; portlist=CommPortIdentifier.getPortIdentifiers(); while(portlist.hasMoreElements()) { commportid1=(CommPortIdentifier)portlist.nextElement(); if(commportid1.getPortType()==CommPortIdentifier.PORT_SERIAL) { System.out.println("List of Ports+"+commportid1.getName()+commportid1.getCurrentOwner()); } } commportid1 = CommPortIdentifier.getPortIdentifier("/dev/ttyS0"); System.out.println("So the port in use is+"+commportid1.getName()+"type is+"+commportid1.getPortType()+"Owner is+"+commportid1.getCurrentOwner()); serialPort = (SerialPort)commportid1.open("COM",2000);/*CLAIM OWNERSHIP(name resolving,waiting time)*/ serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); //serialPort.enableReceiveThreshold(1080); System.out.println("BAUD RATE"+serialPort.getBaudRate()+"\nDATA BITS"+serialPort.getDataBits()+"\nstop bits"+serialPort.getStopBits()+"\nflowcontrol"+serialPort.getFlowControlMode()); } catch(NoSuchPortException np) {System.out.println("NO suchPOrt Exists in port identification"+np);} catch(PortInUseException p) { System.out.println("Port In use Exception in port identification"+p);} catch(UnsupportedCommOperationException e) { System.out.println("Speed is not supported in port identification"+e);} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in port identification"+ne);} try { // Get output and input streams outStream = serialPort.getOutputStream(); inStream = serialPort.getInputStream(); }//end of try catch(IOException ioe) {System.out.println("The streams are not opening in i/o streams");} catch(java.lang.NullPointerException ne) { System.out.println("NULL BHAIYYA in i/o streams"+ne);} catch(Exception e) { System.out.println("Exception in enumerating the ports in i/o streams"+e);} } public SerialPortImpl1() { q1= new Quec("que"); } public void receiveByte() throws IOException { do { char r='N';//w global int n=0; try{ r=(char)inStream.read();//System.out.print(r); //CHECK FOR THRESHOLD(OUR BUFFER) int i=0,k=0; //The queue holds the data(each node has 1 hex charecter(4 bits))when 540 nodes(chars) //are stored then the queue is repeated with the next data being stored in the 1st nodeTHIS //AVAOIDES ANY MEMORY PROBLEM if(w==540){q1.cycle(r);w=0;S++;System.out.println("SET OVER"+S);} else {q1.enque(r);w++;System.out.print(q1.ar[k++]);} if(w%72==0){System.out.print(" ");k=0;} }//try ends catch(IOException ie){System.out.println("io in receiveByte"+ie);} catch(NullPointerException ne){System.out.println("NULL in receiveByte"+ne);} catch(Exception e){System.out.println("general exception in receiveByte"+e);} }while(true); }//end of receive public static void main(String ab[]) { SerialPortImpl1 serialP=new SerialPortImpl1(); try{ serialP.initializeSerialPort();//ALL THE INTIAL SETTINGS serialP.receiveByte(); These i have removed b'coz the ports are closed aas i shut the program and since evrytime i execute it again the port is found that means it is not the problem //outStream.close();inStream.close();serialPort.sendBreak(1);commportid1.internalClosePort();os.close(); }//try ends catch(IOException ioe) {System.out.println("IOEXCEPTION in calling receive byte in while loop"+ioe);} catch(SecurityException se) {System.out.println("SECURITY EXCEPTIONin calling receive byte in while loop+"+se);} catch(java.lang.NullPointerException ne) { System.out.println("NULL in calling receive byte in while loop"+ne);} }//main ends }//end of class ** thankin u EXPECTING A REPLY AT THE EARLIEST -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/29f4bdcc/attachment-0004.html From gildedfalcon at googlemail.com Wed Feb 22 05:43:23 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 13:43:23 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Heya again! I have not switched to Version 2.1 yet, because I want to use javax.comm as long as possible, because it is installed everywhere here. Thus I want to be more precise getting the error with 1.4, although many people won't be read this. The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages of data. But, trying to get these Data per Java-program, I only get between 100 and 150 bytes. Sometimes more, sometimes less. Thus there is a problem with the flow. Does anybody has an idea? Or my anyone has RXTX 2.0 precompiled for arm-linux ? Phil From gildedfalcon at googlemail.com Wed Feb 22 06:32:13 2006 From: gildedfalcon at googlemail.com (Philipp Kemmeter) Date: Wed, 22 Feb 2006 14:32:13 +0100 Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: Hey everybody. I've changed to 2.1 with the binary from toolkit. But: The same error. I now receive about 1,5k of data, but 250k of data were sent. As I said before, a cat on the device can fetch all the data, so it's not a problem of the serial driver or of the bluetooth to serial converter driver. Any ideas ? 2006/2/16, Trent Jarvi : > On Thu, 16 Feb 2006, daniel.manzke wrote: > > > Hi Phil, > > > > i've a pre-compiled version for an arm-linux... we have a board with an > > arm-proc on it... and I compiled it with java 1.5... but kernel 2.4 I > > thing... > > > > could it be that the kernel doesn't matter?!... because then I really thing > > about it... I compiled it on a suse linux... because we have an arm-linux > > cross-compiler... at the old boards the rxtx 2.1-pre17 I think... works... > > had no time to test it at the new ones with kernel 2.6.. > > > > but u would get a problem because jre 1.3.1.... hmm lots of questions I mean > > :D > > > > we don't use any jre... because of the licenses... we use the open-source > > gnu classpath and jamvm... > > I think the only thing that really matters is the glibc version. I've > tried to push some changes into gnu's glibc that fix flow control. Its > there now but I don't know which version. Rather amazing it was found in > java. > > Its the glibc headers that are important though. The kernel was always > there. RMK is a great maintainer there. > > It should work and nods on the 2.4 kernel.. I realize thats what many are > doing. Especially dragged behind by non open source drivers but in > general tool. I don't think its a problem though for getting things > going. > > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From f.frumento at ngi.it Wed Feb 22 09:52:19 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 17:52:19 +0100 Subject: [Rxtx] New problems compiling Rxtx Message-ID: <43FC96C3.4050401@ngi.it> Hi Trent, I have a new problem compiling Rxtx with windows, the build process end fine but if i try to use the .dll files the Java virtual machine crash in the nativeGetVersion of the SerialImp.c the strange thing is that I've already successful build the .dll some week ago and i've not touched the build environment neither the Java installation... I'm using mingw CURRENT release with the MSYS environment, could kindly tell me what are you using to buil the windows version of RXTX ? here is the message: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [jvm.dll+0x115216] # # An error report file with more information is saved as hs_err_pid4228.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Regards Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid4228.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060222/0caea44c/hs_err_pid4228-0004.pl From tjarvi at qbang.org Wed Feb 22 10:09:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:09:58 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end fine > but if i try to use the .dll files the Java virtual machine crash in the > nativeGetVersion of the SerialImp.c the strange thing is that I've already > successful build the .dll some week ago and i've not touched the build > environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly tell > me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > I compile windows with crosstools. That should not make any difference though. rxtx.org bins are compiled with gcc-2.95 for machine target i386-mingw32. In the future this will be gcc-3.4.4 or so with the linux cross-tool chain used for the ToyBox. There isn't any real advantage to compiling rxtx with the latest gcc. Use something with known behavior. Especially for production. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Feb 22 10:22:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:22:51 -0700 (MST) Subject: AW: [Rxtx] Strange error occuring w/ rxtx 1.4 for arm-linux In-Reply-To: References: <200602161546.k1GFk4iE001006@farad.et-inf.fho-emden.de> Message-ID: On Wed, 22 Feb 2006, Philipp Kemmeter wrote: > Heya again! > > I have not switched to Version 2.1 yet, because I want to use > javax.comm as long as possible, because it is installed everywhere > here. Thus I want to be more precise getting the error with 1.4, > although many people won't be read this. > > The data stream seems to get cut. Making a cat /dev/ttyS3 I get pages > of data. But, trying to get these Data per Java-program, I only get > between 100 and 150 bytes. Sometimes more, sometimes less. Thus there > is a problem with the flow. Does anybody has an idea? > > Or my anyone has RXTX 2.0 precompiled for arm-linux ? > > Phil > Have you turned on hardware flow control? Doing a cat suggests some parts of the driver are correct. If its open source, the odds are good the entire driver is correct. But cat does not do very much. If someone wants to do something with rxtx 2.0 they can. I will not be looking at it until after the known issues are resolved and sun offers a release or prerelease to work with. It's a waste of time until then. But I doubt 2.0 will help you because rxtx 2.0 and 2.1 use the same native code with just some names changed to protect the inocent. -- Trent Jarvi tjarvi at qbang.org From f.frumento at ngi.it Wed Feb 22 10:25:35 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 22 Feb 2006 18:25:35 +0100 Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC96C3.4050401@ngi.it> References: <43FC96C3.4050401@ngi.it> Message-ID: <43FC9E8F.1020407@ngi.it> Hi Trent, After digging a while in the mingw documentation i've found that with the following lines i can build working rxtxSerial.dll and rxtxParallel.dll without the hassle of the sed/grep stuff i don't know if you already know but the lines are (as they appear in the makefile): $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc this is the offical way to build a native java library as explained here: http://www.mingw.org/mingwfaq.shtml#faq-jni-dll Fabio Frumento wrote: > Hi Trent, > > I have a new problem compiling Rxtx with windows, the build process end > fine but if i try to use the .dll files the Java virtual machine crash > in the nativeGetVersion of the SerialImp.c the strange thing is that > I've already successful build the .dll some week ago and i've not > touched the build environment neither the Java installation... > > I'm using mingw CURRENT release with the MSYS environment, could kindly > tell me what are you using to buil the windows version of RXTX ? > > here is the message: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, > tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > # An error report file with more information is saved as hs_err_pid4228.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > Regards > Fabio > > > ------------------------------------------------------------------------ > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, tid=3948 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # V [jvm.dll+0x115216] > # > > --------------- T H R E A D --------------- > > Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] > > siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 > > Registers: > EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 > ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 > EIP=0x6d7f5216, EFLAGS=0x00010246 > > Top of Stack: (sp=0x0006f220) > 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 > 0x0006f230: 00356890 00356890 0704f750 6d7648b0 > 0x0006f240: 0630d214 00356890 00356890 6d76c731 > 0x0006f250: 0630d214 00356890 00356890 00000006 > 0x0006f260: 00356950 00356890 0704f750 0b18a031 > 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 > 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 > 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 > > Instructions: (pc=0x6d7f5216) > 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 > 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff > > > Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > V [jvm.dll+0x115216] > V [jvm.dll+0xd484b] > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xa17f5] > V [jvm.dll+0x9abb2] > C [java.dll+0x13d8] > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x76f5d] > V [jvm.dll+0x75e58] > V [jvm.dll+0xc4baa] > V [jvm.dll+0xc5847] > V [jvm.dll+0xc572d] > V [jvm.dll+0x7fc8d] > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > V [jvm.dll+0x845a9] > V [jvm.dll+0xd9317] > V [jvm.dll+0x8447a] > V [jvm.dll+0x8b44a] > C [javaw.exe+0x14c5] > C [javaw.exe+0x3151] > C [kernel32.dll+0x16d4f] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 > j gnu.io.RXTXCommDriver.()V+9 > v ~StubRoutines::call_stub > j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 > j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 > j gnu.io.CommPortIdentifier.()V+12 > v ~StubRoutines::call_stub > j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 > j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] > 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] > 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] > 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] > 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460] > 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] > 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4564] > 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5868] > 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4720] > 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3696] > 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] > 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3260] > =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] > > Other Threads: > 0x00a23448 VMThread [id=5396] > 0x00a3d7a8 WatcherThread [id=5540] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 576K, used 333K [0x02a70000, 0x02b10000, 0x02f50000) > eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) > from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) > to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) > tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, 0x06a70000) > the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, 0x030b0000) > compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, 0x0aa70000) > the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, 0x07270000) > No shared spaces configured. > > Dynamic libraries: > 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe > 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll > 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll > 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll > 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll > 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll > 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll > 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll > 0x6d6e0000 - 0x6d874000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll > 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll > 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll > 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL > 0x6d3f0000 - 0x6d425000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\jdwp.dll > 0x6d6b0000 - 0x6d6bc000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\verify.dll > 0x6d370000 - 0x6d38d000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\java.dll > 0x6d6d0000 - 0x6d6df000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\zip.dll > 0x6d290000 - 0x6d297000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\dt_socket.dll > 0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll > 0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll > 0x719d0000 - 0x71a10000 C:\WINDOWS\System32\mswsock.dll > 0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll > 0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll > 0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll > 0x75280000 - 0x7529e000 C:\WINDOWS\system32\wshbth.dll > 0x778f0000 - 0x779e7000 C:\WINDOWS\system32\SETUPAPI.dll > 0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll > 0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll > 0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll > 0x6d070000 - 0x6d1d7000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\awt.dll > 0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV > 0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.dll > 0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll > 0x5b180000 - 0x5b1b8000 C:\WINDOWS\system32\uxtheme.dll > 0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll > 0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll > 0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL > 0x6d2b0000 - 0x6d2ed000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\fontmanager.dll > 0x10000000 - 0x10014000 C:\WINDOWS\system32\patchmod.dll > 0x0b0f0000 - 0x0b105000 C:\WINDOWS\system32\hookmod.dll > 0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\shell32.dll > 0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll > 0x773a0000 - 0x774a2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll > 0x5d4d0000 - 0x5d567000 C:\WINDOWS\system32\comctl32.dll > 0x0b180000 - 0x0b193000 C:\home\fabio\klimat_workspace\KUI\rxtxSerial.dll > 0x73d00000 - 0x73d27000 C:\WINDOWS\system32\crtdll.dll > > VM Arguments: > jvm_args: -Djava.library.path=C:\home\fabio\klimat_workspace\KUI -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1354 > java_command: com.klimat.apps.Klimat_UI > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\\Programmi\\Java\\jdk1.5.0_06 > CLASSPATH=C:\Programmi\Java\jre1.5.0_06\lib\ext\QTJava.zip > PATH=c:\ruby\bin;C:\Tcl\bin;C:\Perl\bin\;C:\Programmi\php;C:\Programmi\php\ext;C:\siemens\SMTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File comuni\GTK\2.0\bin;;C:\Programmi\IDM Computer Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;;C:\Programmi\WinSCP3\;C:\Programmi\MySQL\MySQL Server 5.0\bin;C:\MGC\embedded\lib;C:\MGC\embedded\bin;C:\Programmi\IDM Computer Solutions\UltraCompare > USERNAME=Puccet > OS=Windows_NT > PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD > > > > --------------- S Y S T E M --------------- > > OS: Windows XP Build 2600 Service Pack 2 > > CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse > > Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) > > vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Feb 22 10:36:43 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 22 Feb 2006 10:36:43 -0700 (MST) Subject: [Rxtx] New problems compiling Rxtx In-Reply-To: <43FC9E8F.1020407@ngi.it> References: <43FC96C3.4050401@ngi.it> <43FC9E8F.1020407@ngi.it> Message-ID: Thanks Fabio I figured it was possible but didnt look. I'll put that into the Makefiles in a couple days. When I return home. Trip to Boston went great BTW. On Wed, 22 Feb 2006, Fabio Frumento wrote: > Hi Trent, > > After digging a while in the mingw documentation i've found that with the > following lines i can build working rxtxSerial.dll and rxtxParallel.dll > without the hassle of the sed/grep stuff i don't know if you already know but > the lines are (as they appear in the makefile): > > $(DEST)/rxtxSerial.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxSerial.dll $(SPATH)/SerialImp.c > $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > $(DEST)/rxtxParallel.dll: $(CLASSES) $(TOP)/Makefile > gcc -DWIN32 -D __int64="long long" -D_JNI_IMPLEMENTATION_ > -mno-fp-ret-in-387 -I $(TOP) -I $(DEST) -I . $(WINDOWS_JAVA_INCLUDE) -I > $(SPATH) -Wl,--kill-at -shared -o $(DEST)/rxtxParallel.dll > $(SPATH)/ParallelImp.c $(SPATH)/termios.c $(SPATH)/fixup.c $(SPATH)/init.cc > > this is the offical way to build a native java library as explained here: > > http://www.mingw.org/mingwfaq.shtml#faq-jni-dll > > Fabio Frumento wrote: >> Hi Trent, >> >> I have a new problem compiling Rxtx with windows, the build process end >> fine but if i try to use the .dll files the Java virtual machine crash in >> the nativeGetVersion of the SerialImp.c the strange thing is that I've >> already successful build the .dll some week ago and i've not touched the >> build environment neither the Java installation... >> >> I'm using mingw CURRENT release with the MSYS environment, could kindly >> tell me what are you using to buil the windows version of RXTX ? >> >> here is the message: >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> # An error report file with more information is saved as hs_err_pid4228.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> >> Regards >> Fabio >> >> >> ------------------------------------------------------------------------ >> >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7f5216, pid=4228, >> tid=3948 >> # >> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # V [jvm.dll+0x115216] >> # >> >> --------------- T H R E A D --------------- >> >> Current thread (0x00356890): JavaThread "main" [_thread_in_vm, id=3948] >> >> siginfo: ExceptionCode=0xc0000005, reading address 0x0630d214 >> >> Registers: >> EAX=0x0630d214, EBX=0x0704f750, ECX=0x0000deab, EDX=0x6d82f270 >> ESP=0x0006f220, EBP=0x0006f224, ESI=0x00000000, EDI=0x00000000 >> EIP=0x6d7f5216, EFLAGS=0x00010246 >> >> Top of Stack: (sp=0x0006f220) >> 0x0006f220: 00356890 0006f278 6d7b484b 0630d214 >> 0x0006f230: 00356890 00356890 0704f750 6d7648b0 >> 0x0006f240: 0630d214 00356890 00356890 6d76c731 >> 0x0006f250: 0630d214 00356890 00356890 00000006 >> 0x0006f260: 00356950 00356890 0704f750 0b18a031 >> 0x0006f270: 00356950 0630d214 0006f2a4 00a79f65 >> 0x0006f280: 00356950 0006f2ac 0006f288 0704f750 >> 0x0006f290: 0006f2b0 0704f9c0 00000000 0704f750 >> Instructions: (pc=0x6d7f5216) >> 0x6d7f5206: 7c e9 8b c6 5e c9 c3 55 8b ec 8b 45 08 56 33 f6 >> 0x6d7f5216: 80 38 00 74 0f 8d 4d 0a 46 51 50 e8 cf fe ff ff >> >> Stack: [0x00030000,0x00070000), sp=0x0006f220, free space=252k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> V [jvm.dll+0x115216] >> V [jvm.dll+0xd484b] >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xa17f5] >> V [jvm.dll+0x9abb2] >> C [java.dll+0x13d8] >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x76f5d] >> V [jvm.dll+0x75e58] >> V [jvm.dll+0xc4baa] >> V [jvm.dll+0xc5847] >> V [jvm.dll+0xc572d] >> V [jvm.dll+0x7fc8d] >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> V [jvm.dll+0x845a9] >> V [jvm.dll+0xd9317] >> V [jvm.dll+0x8447a] >> V [jvm.dll+0x8b44a] >> C [javaw.exe+0x14c5] >> C [javaw.exe+0x3151] >> C [kernel32.dll+0x16d4f] >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j gnu.io.RXTXVersion.nativeGetVersion()Ljava/lang/String;+0 >> j gnu.io.RXTXCommDriver.()V+9 >> v ~StubRoutines::call_stub >> j >> java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0 >> j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5 >> j gnu.io.CommPortIdentifier.()V+12 >> v ~StubRoutines::call_stub >> j com.klimat.mm.ui.utils.JRS232Configurator.RS232Init()V+1391 >> j com.klimat.apps.Klimat_UI.main([Ljava/lang/String;)V+19 >> v ~StubRoutines::call_stub >> >> --------------- P R O C E S S --------------- >> >> Java Threads: ( => current thread ) >> 0x0ade3920 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5652] >> 0x0adce710 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924] >> 0x0adce0c0 JavaThread "AWT-Shutdown" [_thread_blocked, id=4536] >> 0x0adc7b18 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5492] >> 0x00a3c520 JavaThread "Low Memory Detector" daemon [_thread_blocked, >> id=4460] >> 0x00a3aac0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5260] >> 0x00a399d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, >> id=4564] >> 0x00a380f8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, >> id=5868] >> 0x00a36ef0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, >> id=4720] >> 0x003570f0 JavaThread "JDWP Transport Listener: dt_socket" daemon >> [_thread_blocked, id=3696] >> 0x00a26af8 JavaThread "Finalizer" daemon [_thread_blocked, id=4908] >> 0x00a25e70 JavaThread "Reference Handler" daemon [_thread_blocked, >> id=3260] >> =>0x00356890 JavaThread "main" [_thread_in_vm, id=3948] >> >> Other Threads: >> 0x00a23448 VMThread [id=5396] >> 0x00a3d7a8 WatcherThread [id=5540] >> >> VM state:not at safepoint (normal execution) >> >> VM Mutex/Monitor currently owned by a thread: None >> >> Heap >> def new generation total 576K, used 333K [0x02a70000, 0x02b10000, >> 0x02f50000) >> eden space 512K, 52% used [0x02a70000, 0x02ab3658, 0x02af0000) >> from space 64K, 100% used [0x02af0000, 0x02b00000, 0x02b00000) >> to space 64K, 0% used [0x02b00000, 0x02b00000, 0x02b10000) >> tenured generation total 1408K, used 380K [0x02f50000, 0x030b0000, >> 0x06a70000) >> the space 1408K, 27% used [0x02f50000, 0x02faf1c8, 0x02faf200, >> 0x030b0000) >> compacting perm gen total 8192K, used 6014K [0x06a70000, 0x07270000, >> 0x0aa70000) >> the space 8192K, 73% used [0x06a70000, 0x0704fa38, 0x0704fc00, >> 0x07270000) >> No shared spaces configured. >> >> Dynamic libraries: >> 0x00400000 - 0x0040c000 C:\Programmi\Java\jdk1.5.0_06\bin\javaw.exe >> 0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll >> 0x7c800000 - 0x7c8ff000 C:\WINDOWS\system32\kernel32.dll >> 0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll >> 0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll >> 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll >> 0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll >> 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll >> 0x6d6e0000 - 0x6d874000 >> C:\Programmi\Java\jdk1.5.0_06\jre\bin\client\jvm.dll >> 0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll >> 0x6d2f0000 - 0x6d2f8000 C:\Programmi\Java\jdk1.5.0_06\jre\bin\hpi.dll >> 0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL >> 0x6d3f0000 - 0x6d425000 >> C:\Programmi\Java\jdk1.5.0_06\jre\